سؤال

For some reason I just can't get the latest version of Hominid working with groupings in MailChimp.

Here's a snippet of what I'm doing:

info[:GROUPINGS] = { 'name' => 'Locations', 'groups' => 'SomeLocation' }    
mailchimp = Hominid::API.new(MAILCHIMP_API_KEY)
list_id = mailchimp.find_list_id_by_name MAILCHIMP_LIST_NAME
mailchimp.list_update_member(list_id, email_value, info)

I've tried seemingly every combination of arrays and hashes to get the groupings working, but I keep getting variations of this error:

<270> "V" is not a valid Interest Grouping id for the list: Test List

Any help would be appreciated!

هل كانت مفيدة؟

المحلول

It seems that it needs an array of hashes:

info[:GROUPINGS] = [ { 'name' => 'Locations', 'groups' => 'SomeLocation' } ]

I hope this helps someone!

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top