- marked as trivial
- marked as enhancement
Sadly for the moment there is no easy way to accomplish this task, but it will be nice to have.
In the meantime, you could do something like this to get the next page with results:
if (isset($listAll['next'])) {
$list2 = $repos->getClient()->setApiVersion('2.0')->request($listAll['next']);
$listAll2 = json_decode($list2->getContent(), true);
}
I implemented a simple Pager in 0b1758d136f3 and 185aea0a2ae3 and I will appreciate any feedback from anyone who has the time to test it.
For the moment who wants to test it, needs to use the
develop
branch and because the documentation from the website is not yet updated, I will leave a code snippet here as a simple example:Note: Any method of
Pager
that is prefixed withfetch
implies that a new HTTP request will be made.Expectations:
Pager
should work the same with API v1 and v2; if not, please open a new issue.