gibbon 2.2.1 → 2.2.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of gibbon might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a4ade9615ee9a69d1ce2d1d560ce14ec92430dd2
4
- data.tar.gz: a82c3dea034eead23703265b805607a0c311e14f
3
+ metadata.gz: 610778f055df0af1212f58dbdafd6e9979c40cc2
4
+ data.tar.gz: 3b4f5b4760b3509c381e3c346170673c9bdc4bf3
5
5
  SHA512:
6
- metadata.gz: 6dd1f3f444a7e6e0852f70705676cff464e67c3455a3be06c16bbd6597e7c33678e392c47184821b8c97c77c3b4bbe834620dbf2430c56da3e7176d2e0fa7d25
7
- data.tar.gz: 99e997b80b822cfa08d93fa4004ccd2395aa0a699ba9e37bfb0360b891194e5e861b6f32dfe1e0f5ebcb5e42f0a8d96eab0ee76a9ff1bcbbfd47670f4affe431
6
+ metadata.gz: 0d979629f9140b4359b1bcd08fb029a4760828db9fd759579e99de13a8d60bfc0ba1de87244accce091c36b583b936fdd7ba2741e7bf2990f9b73992153d35d8
7
+ data.tar.gz: 0a6cd276fcb3f7db9cf879444b96cb5de84b4d5f9b0d40e089e7ca14029b0188eb85e6fce2b1bf8c78f57666805c47d113b96fa4844478c34b1e8b60ba9d64e0
@@ -1,5 +1,8 @@
1
1
  ## [Unreleased][unreleased]
2
2
 
3
+ ## [2.2.2] - 2016-03-15
4
+ - Update dependencies
5
+
3
6
  ## [2.2.1] - 2016-01-01
4
7
  - Improve MailChimpError logging
5
8
 
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  platforms :rbx do
4
- gem 'rubysl', '~> 2.1.0'
4
+ gem 'rubysl', '~> 2.2.0'
5
5
  gem 'rubinius-developer_tools'
6
6
  end
7
7
 
@@ -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(member_id).update(body: { status: "unsubscribed" })
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
@@ -1,3 +1,3 @@
1
1
  module Gibbon
2
- VERSION = "2.2.1"
2
+ VERSION = "2.2.2"
3
3
  end
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.1
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-01-01 00:00:00.000000000 Z
11
+ date: 2016-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday