hominid 2.1.1 → 2.1.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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.1.1
1
+ 2.1.2
data/hominid.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{hominid}
8
- s.version = "2.1.1"
8
+ s.version = "2.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Brian Getting", "Michael Str\303\274der"]
12
- s.date = %q{2010-04-21}
12
+ s.date = %q{2010-06-11}
13
13
  s.description = %q{Hominid is a Ruby gem that provides a wrapper for interacting with the Mailchimp email marketing service API.}
14
14
  s.email = %q{brian@terra-firma-design.com}
15
15
  s.extra_rdoc_files = [
@@ -6,7 +6,7 @@ module Hominid
6
6
  # information like Credit Card numbers is available.
7
7
  #
8
8
  # Parameters:
9
- # * options (Hash) =
9
+ # * none
10
10
  #
11
11
  # Returns:
12
12
  # An array of account details for this API key including:
data/lib/hominid/list.rb CHANGED
@@ -41,11 +41,11 @@ module Hominid
41
41
  # Get all email addresses that complained about a given list.
42
42
  #
43
43
  # Parameters:
44
- # * list_id (String) = The mailing list ID value.
45
- # * list_id (String) = The mailing list ID value.
46
- # * start (Integer) = Page number to start at. Defaults to 0.
47
- # * limit (Integer) = Number of results to return. Defaults to 500. Upper limit is 1000.
48
- # * since (DateTime) = Only return email reports since this date. Must be in YYYY-MM-DD HH:II:SS format (GMT).
44
+ # * list_id (String) = The mailing list ID value.
45
+ # * list_id (String) = The mailing list ID value.
46
+ # * start (Integer) = Page number to start at. Defaults to 0.
47
+ # * limit (Integer) = Number of results to return. Defaults to 500. Upper limit is 1000.
48
+ # * since (DateTime) = Only return email reports since this date. Must be in YYYY-MM-DD HH:II:SS format (GMT).
49
49
  #
50
50
  # Returns:
51
51
  # An array of abuse reports for this list including:
@@ -62,8 +62,8 @@ module Hominid
62
62
  # enabled, adding the first group will automatically turn them on.
63
63
  #
64
64
  # Parameters:
65
- # * list_id (String) = The mailing list ID value.
66
- # * group (String) = The interest group to add.
65
+ # * list_id (String) = The mailing list ID value.
66
+ # * group (String) = The interest group to add.
67
67
  #
68
68
  # Returns:
69
69
  # True if successful, error code if not.
@@ -73,10 +73,27 @@ module Hominid
73
73
  end
74
74
  alias :interest_group_add :create_group
75
75
 
76
+ # Add a new Interest Grouping - if interest groups for the List are not yet
77
+ # enabled, adding the first grouping will automatically turn them on.
78
+ #
79
+ # Parameters:
80
+ # * list_id (String) = The mailing list ID value.
81
+ # * name (String) = The interest grouping to add - grouping names must be unique
82
+ # * type (String) = The type of the grouping to add - one of "checkboxes", "hidden", "dropdown", "radio"
83
+ # * groups (Array) = The lists of initial group names to be added - at least 1 is required and the names must be unique within a grouping. If the number takes you over the 60 group limit, an error will be thrown.
84
+ #
85
+ # Returns:
86
+ # The new grouping id if the request succeeds, otherwise an error will be thrown.
87
+ #
88
+ def create_grouping(list_id, name, type, groups)
89
+ call("listInterestGroupingAdd", list_id, name, type, groups)
90
+ end
91
+ alias :interest_grouping_add :create_grouping
92
+
76
93
  # Add a new merge tag to a given list
77
94
  #
78
95
  # Parameters:
79
- # * list_id (String) = The mailing list ID value.
96
+ # * list_id (String) = The mailing list ID value.
80
97
  # * tag (String) = The merge tag to add. Ex: FNAME
81
98
  # * name (String) = The long description of the tag being added, used for user displays.
82
99
  # * required (Boolean) = TODO: set this up to accept the options available.
@@ -129,6 +146,20 @@ module Hominid
129
146
  call("listInterestGroupDel", list_id, group)
130
147
  end
131
148
  alias :interest_group_del :delete_group
149
+
150
+ # Delete an existing Interest Grouping - this will permanently delete
151
+ # all contained interest groups and will remove those selections from all list members.
152
+ #
153
+ # Parameters:
154
+ # * grouping_id (String) = The interest grouping id.
155
+ #
156
+ # Returns:
157
+ # True if the request succeeds, otherwise an error will be thrown.
158
+ #
159
+ def delete_grouping(grouping_id)
160
+ call("listInterestGroupingDel", grouping_id)
161
+ end
162
+ alias :interest_grouping_del :delete_grouping
132
163
 
133
164
  # Delete a merge tag from a given list and all its members.
134
165
  # Seriously - the data is removed from all members as well!
@@ -178,6 +209,24 @@ module Hominid
178
209
  end
179
210
  alias :interest_groups :groups
180
211
 
212
+ # Get the list of interest groupings for a given list, including
213
+ # the label, form information, and included groups for each.
214
+ #
215
+ # Parameters:
216
+ # * list_id (String) = The list id to connect to.
217
+ #
218
+ # Returns:
219
+ # A struct of interest groupings for the list:
220
+ # * id (String) = The id for the Grouping
221
+ # * name (String) = Name for the Interest groups
222
+ # * form_field (String) = Gives the type of interest group: checkbox,radio,select
223
+ # * groups (Array) = Array of the grouping options including the "bit" value, "name", "display_order", and number of "subscribers" with the option selected.
224
+ #
225
+ def groupings(list_id)
226
+ call("listInterestGroupings", list_id)
227
+ end
228
+ alias :interest_groupings :groupings
229
+
181
230
  # Access the Growth History by Month for a given list.
182
231
  #
183
232
  # Parameters:
@@ -203,16 +252,18 @@ module Hominid
203
252
  #
204
253
  # Returns:
205
254
  # An array of list member info with the following fields:
206
- # * id (String) = The unique id for this email address on an account.
207
- # * email (String) = The email address associated with this record.
208
- # * email_type (String) = The type of emails this customer asked to get: html, text, or mobile.
209
- # * merges (Array) = An associative array of all the merge tags and the data for those tags for this email address. Note: Interest Groups are returned as comma delimited strings - if a group name contains a comma, it will be escaped with a backslash. ie, "," => "\,"
210
- # * status (String) = The subscription status for this email address, either subscribed, unsubscribed or cleaned.
211
- # * ip_opt (String) = IP Address this address opted in from.
212
- # * ip_signup (String) = IP Address this address signed up from.
213
- # * campaign_id (String) = If the user is unsubscribed and they unsubscribed from a specific campaign, that campaign_id will be listed, otherwise this is not returned.
214
- # * list (Array) = An associative array of the other lists this member belongs to - the key is the list id and the value is their status in that list.
215
- # * timestamp (Date) = The time this email address was added to the list
255
+ # * id (String) = The unique id for this email address on an account.
256
+ # * email (String) = The email address associated with this record.
257
+ # * email_type (String) = The type of emails this customer asked to get: html, text, or mobile.
258
+ # * merges (Array) = An associative array of all the merge tags and the data for those tags for this email address. Note: Interest Groups are returned as comma delimited strings - if a group name contains a comma, it will be escaped with a backslash. ie, "," => "\,"
259
+ # * status (String) = The subscription status for this email address, either subscribed, unsubscribed or cleaned.
260
+ # * ip_opt (String) = IP Address this address opted in from.
261
+ # * ip_signup (String) = IP Address this address signed up from.
262
+ # * campaign_id (String) = If the user is unsubscribed and they unsubscribed from a specific campaign, that campaign_id will be listed, otherwise this is not returned.
263
+ # * lists (Array) = An associative array of the other lists this member belongs to - the key is the list id and the value is their status in that list.
264
+ # * timestamp (Date) = The time this email address was added to the list
265
+ # * info_changed (Date) = The last time this record was changed. If the record is old enough, this may be blank.
266
+ # * web_id (Integer) = The Member id used in our web app, allows you to create a link directly to it.
216
267
  #
217
268
  def member_info(list_id, email)
218
269
  call("listMemberInfo", list_id, email)
@@ -334,7 +385,7 @@ module Hominid
334
385
  #
335
386
  # Parameters:
336
387
  # * list_id (String) = The mailing list ID value.
337
- # * emails (Array) = An array of email addresses to unsubscribe.
388
+ # * emails (Array) = An array of subscriber hashes with EMAIL and EMAIL_TYPE as keys.
338
389
  # * options (Hash) = A hash of unsubscribe options including:
339
390
  # * :delete_member (defaults to true)
340
391
  # * :send_goodbye (defaults to false)
@@ -362,6 +413,20 @@ module Hominid
362
413
  call("listInterestGroupUpdate", list_id, old_name, new_name)
363
414
  end
364
415
 
416
+ # Update an existing Interest Grouping.
417
+ #
418
+ # Parameters:
419
+ # * grouping_id (String) = The interest grouping ID.
420
+ # * name (String) = The name of the field to update - either "name" or "type".
421
+ # * value (String) = The new value of the field.
422
+ #
423
+ # Returns:
424
+ # True if successful, error code if not.
425
+ #
426
+ def update_grouping(grouping_id, name, value)
427
+ call("listInterestGroupingUpdate", grouping_id, name, value)
428
+ end
429
+
365
430
  # Edit the email address, merge fields, and interest groups for a list member.
366
431
  #
367
432
  # Parameters:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hominid
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Getting
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2010-04-21 00:00:00 -07:00
13
+ date: 2010-06-11 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies: []
16
16