klaviyo / php-klaviyo

PHP wrapper for the Klaviyo API
59 stars 48 forks source link

A way to get list pages #72

Closed stuartcusackie closed 2 years ago

stuartcusackie commented 2 years ago

Klaviyo API provides a 'marker' variable to retrieve additional pages when there are more than 1000 members on a list, but I don't see a way to use it in this package.

Is this possible?

Thank you!

smoucka commented 2 years ago

Hi @stuartcusackie

Yes, it is possible. Apologies the argument is not mentioned in the example but it is present in the package. https://github.com/klaviyo/php-klaviyo/blob/b85a3bff2b2dbeaa7a2998556ca3da633c99ebee/src/Lists.php#L462

Just make that subsequent request like this:

$client->lists->getAllMembers( 'GroupId', $marker = $marker_value );

I can update the example in the README.

stuartcusackie commented 2 years ago

Perfect. Thank you!