Seems it takes parameters. One is $count (10) and one is $offset (page) https://github.com/mailchimp/mailchimp-marketing-php/blob/master/lib/Api/ListsApi.php#L1701
Feb 14, 2022
15
Level 2
Laravel and Mailchimp API question
Greetings!
I'm new to Laravel. Trying to build an application that gets data using Mailchimp API. It works, but when I'm trying to get a list of lists (sounds funny) I get only 10 out of 15 existed. Anyone already solved that problem? Would be thankful for an advice. Thanks in advance.
The code I use:
Route::get('/', function(){ $client = new MailchimpMarketing\ApiClient(); $client->setConfig([ 'apiKey' => config('services.mailchimp.key'), 'server' => 'usXX', ]);
$response = $client->lists->getAllLists();
$lists = $response->lists;
return view('index', [
'lists' => $lists,
]);
});
Level 102
1 like
Please or to participate in this conversation.