Working with pagination for Campaigns

71 views
Skip to first unread message

landitus

unread,
May 2, 2012, 7:25:35 PM5/2/12
to mailchimp-...@googlegroups.com
Hi! I'm having trouble setting the pagination for the Campaigns method.

I'm working with Codeigniter and the Mailchimp api v1.3. When setting:
$retval3 = $this->mcapi->campaigns(array('folder_id' => 1406), 0, 1000);
It shows up to 1000 campaigns. Good!

but when I set:
 $retval3 = $this->mcapi->campaigns(array('folder_id' => 1406), 25, 25);
or
 $retval3 = $this->mcapi->campaigns(array('folder_id' => 1406), 50, 25);
I get none!

I want to set a pagination system that shows 25 campaigns per page. The pagination is all set, but there's something I must be doing wrong, right?

jesse

unread,
May 3, 2012, 5:21:16 AM5/3/12
to mailchimp-...@googlegroups.com
The documentation is here:
http://apidocs.mailchimp.com/api/rtfm/campaigns.func.php

As mentioned there, start is the zero based page number, limit is the page size. So if you don't have more than 625 campaigns in that folder that will correctly return nothing.


jesse
Reply all
Reply to author
Forward
0 new messages