Closed VadimSS closed 5 years ago
Responses with multiple instances are returned as a Collection
. This class has the option to check a next page using hasNextPage()
.
If a next page is available you can retrieve the cursor
from the Collection's pagination
property and pass it along as $data = ['cursor' => $cursor]
to your method.
$response = $pinterest->pins->fromBoard('giftsbrains/gifts-for-women');
if($response->hasNextPage()) {
$cursor = $response->pagination['cursor'];
$pinterest->pins->fromBoard('giftsbrains/gifts-for-women', [
'cursor' => $cursor
]);
}
This will be in release 0.2.12
I am used this method this way:
$resp = $pinterest->pins->fromBoard('giftsbrains/gifts-for-women', $data = []);
But I got just first 25 pins from this board. How I can fetch all the pins from this board? I have no idea how ho use array $data parameter of this function, and what fields this array must include.