danesparza / MailChimp.NET

:envelope: .NET Wrapper for the MailChimp v2.0 API
MIT License
179 stars 119 forks source link

why GetAllMembersForList() can't get more than the first 100 member? #132

Closed abramofranchetti closed 9 years ago

abramofranchetti commented 9 years ago

why GetAllMembersForList() can't get more than the first 100 member? if you try get an error..

danesparza commented 9 years ago

Hmmm ... can you share your code? What are you passing for the limit parameter on that method? Please be specific as to what error you're getting and what the error is.

abramofranchetti commented 9 years ago

// Get the first 101 members of each list: // MembersResult listMerber = mc.GetAllMembersForList(list.Id, "subscribed", 0,101);

launch exception Server Internal Error.. and if you read the exception message find: "limit cant' be more than 100".

I tried also: MembersResult listMerber = mc.GetAllMembersForList(list.Id, "subscribed", 1,101);

but also launch exception..

mikkoh85 commented 9 years ago

Here's information https://apidocs.mailchimp.com/api/2.0/lists/members.php You can get more than 100 by doing this (in a loop if you wish)

bla bla first 100 from a list = mc.GetAllMembersForList(list.Id, "subscribed", 0,100); bla bla next 100 from a list = mc.GetAllMembersForList(list.Id, "subscribed", 1,100); bla bla 3rd 100 from a list = mc.GetAllMembersForList(list.Id, "subscribed", 2,100);

If you wish. But you can get all members into list at once by using MailChimpExportAPI, although they come out in a different format

abramofranchetti commented 9 years ago

damn... i've check the same page bat not read the entire text.... thank you saved my day.