0

What is the proper way to retrieve an id of a list from MailChimp using Gibbon API Wrapper?

Say I want to do something like:

list = gibbon.lists.list(filters: "Foo")
gibbon.lists(list.id).members.create(....)

list.id returns stack level too deep because of the nested attributes inside the gibbon.listcall. What is the correct way to call list.id in Gibbon?

dimitry_n
  • 2,939
  • 1
  • 30
  • 53

1 Answers1

0

Ended up storing list_id as an environment variable.

This gives me the ability to limit the amount of MailChimp API queries as List Ids are now being stored locally.

I also created additional lists for testing user subscription in different environments (e.g. staging). Using the same code base I'm simply replacing the list ENV value for different environments.

dimitry_n
  • 2,939
  • 1
  • 30
  • 53