Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown method "list_interest_groupings/first" #66

Closed
jai-n opened this issue Oct 28, 2013 · 6 comments
Closed

Unknown method "list_interest_groupings/first" #66

jai-n opened this issue Oct 28, 2013 · 6 comments

Comments

@jai-n
Copy link

jai-n commented Oct 28, 2013

I have initialize my mailchimp object but when i try to get grouping_id igot following error
(rdb:34) mc.grouping_id
*** Gibbon::MailChimpError Exception: MailChimp API Error: Unknown method "list_interest_groupings/first" (code -32601)

@amro
Copy link
Owner

amro commented Oct 28, 2013

Can you paste a code snippet?

Looks like you're doing something like

mc.list_interest_groupings.first

Given the documentation for the call I think you're trying to make, try something like

mc.lists.list_groupings(params)

@jai-n
Copy link
Author

jai-n commented Oct 28, 2013

I have doing like this
def grouping_id
@grouping_id ||= client.list_interest_groupings(:id => mailing_list_id).first['id']
end
when I have try to like client.lists.list_groupings(:id => mailing_list_id) this then got following error
Gibbon::MailChimpError Exception: MailChimp API Error: Unknown method "lists/list-groupings" (code -32601)

@amro
Copy link
Owner

amro commented Oct 28, 2013

I think you're using syntax from an older version of Gibbon (<=0.4.6_ with the new version of Gibbon (>=0.5.0, see the README for more info on the syntax change). The example I gave above should work for you.

@jai-n
Copy link
Author

jai-n commented Oct 28, 2013

No I have follow your new gibbon instruction but found error
i have use just like this
gb = Gibbon::API.new
gb.lists.list_groupings(:id=>"147a8d638d")
*** Gibbon::MailChimpError Exception: MailChimp API Error: Unknown method "lists/list-groupings" (code -32601)
you have any idea about it

@amro
Copy link
Owner

amro commented Oct 28, 2013

It should be list_groupings, not "list_groupings" -- see the API docs for version 2 http://apidocs.mailchimp.com/api/2.0/

@jai-n
Copy link
Author

jai-n commented Oct 29, 2013

Can't solve my issue
I am not using "list_groupings", instead of list_groupings
finally I am using old gem gibbon -v 0.3.5 and my issue was resolved
Thanks Amro

@jai-n jai-n closed this as completed Oct 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants