lib/hominid/list.rb
# Subscribe a batch of email addresses to a list at once.
# 
# Parameters:
# * list_id     (String)  = The mailing list ID value.
# * subscribers (Array)   = An array of email addresses to subscribe.
# * merge_vars  (Hash)    = A hash of subscription options. See the Mailchimp API documentation.
#
# Returns:
# An array of result counts and errors:
# * success_count (Integer) = Number of email addresses that were succesfully added/updated.
# * error_count   (Integer) = Number of email addresses that failed during addition/updating.
# * errors        (Array)   = Array of error structs. Each error struct will contain "code", "message", and the full struct that failed.
#
Subscribe a batch of email addresses to a list at once.
Parameters:
list_id     (String)  = The mailing list ID value.
subscribers (Array)   = An array of email addresses to subscribe.
merge_vars  (Hash)    = A hash of subscription options. See the Mailchimp API documentation.

An array of result counts and errors:
success_count (Integer) = Number of email addresses that were succesfully added/updated.
error_count   (Integer) = Number of email addresses that failed during addition/updating.
errors        (Array)   = Array of error structs. Each error struct will contain "code", "message", and the full struct that failed.
Subscribe a batch of email addresses to a list at once . Parameters : list_id ( String ) = The mailing list ID value . subscribers ( Array ) = An array of email addresses to subscribe . merge_vars ( Hash ) = A hash of subscription options . See the Mailchimp API documentation . An array of result counts and errors : success_count ( Integer ) = Number of email addresses that were succesfully added / updated . error_count ( Integer ) = Number of email addresses that failed during addition / updating . errors ( Array ) = Array of error structs . Each error struct will contain " code " " message " and the full struct that failed .
def subscribe_many(list_id, subscribers, options = {})
      subscribers = subscribers.collect { |subscriber| clean_merge_tags(subscriber) }
      options = apply_defaults_to({:update_existing => true}.merge(options))
      call("listBatchSubscribe", list_id, subscribers, *options.values_at(:double_opt_in, :update_existing, :replace_interests))
    end
def subscribe_many ( list_id , subscribers , options = { } ) subscribers = subscribers . collect { | subscriber | clean_merge_tags ( subscriber ) } options = apply_defaults_to ( { :update_existing => true } . merge ( options ) ) call ( "listBatchSubscribe" , list_id , subscribers , * options . values_at ( :double_opt_in , :update_existing , :replace_interests ) ) end
Subscribe a batch of email addresses to a list at once.
Subscribe a batch of email addresses to a list at once .
list_id
<not_specific>
subscribers
<not_specific>
options
<not_specific>