gibbon 2.2.1 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of gibbon might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/Gemfile +1 -1
- data/README.markdown +41 -7
- data/lib/gibbon/version.rb +1 -1
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 610778f055df0af1212f58dbdafd6e9979c40cc2
         | 
| 4 | 
            +
              data.tar.gz: 3b4f5b4760b3509c381e3c346170673c9bdc4bf3
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 0d979629f9140b4359b1bcd08fb029a4760828db9fd759579e99de13a8d60bfc0ba1de87244accce091c36b583b936fdd7ba2741e7bf2990f9b73992153d35d8
         | 
| 7 | 
            +
              data.tar.gz: 0a6cd276fcb3f7db9cf879444b96cb5de84b4d5f9b0d40e089e7ca14029b0188eb85e6fce2b1bf8c78f57666805c47d113b96fa4844478c34b1e8b60ba9d64e0
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    
    
        data/Gemfile
    CHANGED
    
    
    
        data/README.markdown
    CHANGED
    
    | @@ -99,6 +99,18 @@ Get all subscribers for a list: | |
| 99 99 | 
             
            gibbon.lists(list_id).members.retrieve
         | 
| 100 100 | 
             
            ```
         | 
| 101 101 |  | 
| 102 | 
            +
            By default the Mailchimp API returns 10 results. To set the count to 50:
         | 
| 103 | 
            +
             | 
| 104 | 
            +
            ```ruby
         | 
| 105 | 
            +
            gibbon.lists(list_id).members.retrieve(params: {"count": "50"})
         | 
| 106 | 
            +
            ```
         | 
| 107 | 
            +
             | 
| 108 | 
            +
            And to retrieve the next 50 members:
         | 
| 109 | 
            +
             | 
| 110 | 
            +
            ```ruby
         | 
| 111 | 
            +
            gibbon.lists(list_id).members.retrieve(params: {"count": "50", "offset: "50"})
         | 
| 112 | 
            +
            ```
         | 
| 113 | 
            +
             | 
| 102 114 | 
             
            Subscribe a member to a list:
         | 
| 103 115 |  | 
| 104 116 | 
             
            ```ruby
         | 
| @@ -114,7 +126,21 @@ gibbon.lists(list_id).members(lower_case_md5_hashed_email_address).upsert(body: | |
| 114 126 | 
             
            You can also unsubscribe a member from a list:
         | 
| 115 127 |  | 
| 116 128 | 
             
            ```ruby
         | 
| 117 | 
            -
            gibbon.lists(list_id).members( | 
| 129 | 
            +
            gibbon.lists(list_id).members(lower_case_md5_hashed_email_address).update(body: { status: "unsubscribed" })
         | 
| 130 | 
            +
            ```
         | 
| 131 | 
            +
             | 
| 132 | 
            +
            ### Fields
         | 
| 133 | 
            +
             | 
| 134 | 
            +
            Only retrieve ids and names for fetched lists:
         | 
| 135 | 
            +
             | 
| 136 | 
            +
            ```ruby
         | 
| 137 | 
            +
            gibbon.lists.retrieve(params: {"fields": "lists.id,lists.name"})
         | 
| 138 | 
            +
            ```
         | 
| 139 | 
            +
             | 
| 140 | 
            +
            Only retrieve emails for fetched lists:
         | 
| 141 | 
            +
             | 
| 142 | 
            +
            ```ruby
         | 
| 143 | 
            +
            gibbon.lists(list_id).members.retrieve(params: {"fields": "members.email_address"})
         | 
| 118 144 | 
             
            ```
         | 
| 119 145 |  | 
| 120 146 | 
             
            ### Campaigns
         | 
| @@ -235,8 +261,16 @@ That response gives the interest data, including the ID for the interests themse | |
| 235 261 |  | 
| 236 262 | 
             
            Gibbon raises an error when the API returns an error.
         | 
| 237 263 |  | 
| 238 | 
            -
            Gibbon::MailChimpError has the following attributes: `title`, `detail`, `body`, `raw_body`, `status_code`. Some or all of these may not be
         | 
| 239 | 
            -
            available depending on the nature of the error.
         | 
| 264 | 
            +
            `Gibbon::MailChimpError` has the following attributes: `title`, `detail`, `body`, `raw_body`, `status_code`. Some or all of these may not be
         | 
| 265 | 
            +
            available depending on the nature of the error. For example:
         | 
| 266 | 
            +
             | 
| 267 | 
            +
            ```ruby
         | 
| 268 | 
            +
            begin
         | 
| 269 | 
            +
              gibbon.lists(list_id)members.create(body: body)
         | 
| 270 | 
            +
            rescue Gibbon::MailChimpError => e
         | 
| 271 | 
            +
              puts "Houston, we have a problem: #{e.message} - #{e.raw_body}"
         | 
| 272 | 
            +
            end
         | 
| 273 | 
            +
            ```
         | 
| 240 274 |  | 
| 241 275 | 
             
            ### Other
         | 
| 242 276 |  | 
| @@ -270,7 +304,7 @@ Gibbon 1.x: | |
| 270 304 | 
             
            ```ruby
         | 
| 271 305 | 
             
            gibbon = Gibbon::API.new("your_api_key")
         | 
| 272 306 | 
             
            ```
         | 
| 273 | 
            -
             | 
| 307 | 
            +
             | 
| 274 308 | 
             
            Gibbon 2.x:
         | 
| 275 309 |  | 
| 276 310 | 
             
            ```ruby
         | 
| @@ -286,7 +320,7 @@ Gibbon 1.x: | |
| 286 320 | 
             
            ```ruby
         | 
| 287 321 | 
             
            gibbon.lists.list
         | 
| 288 322 | 
             
            ```
         | 
| 289 | 
            -
             | 
| 323 | 
            +
             | 
| 290 324 | 
             
            Gibbon 2.x:
         | 
| 291 325 |  | 
| 292 326 | 
             
            ```ruby
         | 
| @@ -300,7 +334,7 @@ Gibbon 1.x: | |
| 300 334 | 
             
            ```ruby
         | 
| 301 335 | 
             
            gibbon.lists.members({:id => list_id})
         | 
| 302 336 | 
             
            ```
         | 
| 303 | 
            -
             | 
| 337 | 
            +
             | 
| 304 338 | 
             
            Gibbon 2.x:
         | 
| 305 339 |  | 
| 306 340 | 
             
            ```ruby
         | 
| @@ -314,7 +348,7 @@ Gibbon 1.x: | |
| 314 348 | 
             
            ```ruby
         | 
| 315 349 | 
             
            gibbon.lists.subscribe({:id => list_id, :email => {:email => "foo@bar.com"}, :merge_vars => {:FNAME => "Bob", :LNAME => "Smith"}})
         | 
| 316 350 | 
             
            ```
         | 
| 317 | 
            -
             | 
| 351 | 
            +
             | 
| 318 352 | 
             
            Gibbon 2.x:
         | 
| 319 353 |  | 
| 320 354 | 
             
            ```ruby
         | 
    
        data/lib/gibbon/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: gibbon
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 2.2. | 
| 4 | 
            +
              version: 2.2.2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Amro Mousa
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2016- | 
| 11 | 
            +
            date: 2016-03-15 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: faraday
         |