Currently there is no functionality to make use of the pagination in responses.
This pull request attempts to fix this, by using PHP's generators to only do the API call when traversed.
The only problem is that when you'd also want to use \ArrayAccess it shows weird behaviour if implemented.
Note that since the items are added after first recursion traversal, it also acts as a cache, and enabled the array access after traversal up until item X using a for-loop, or up until the last item when using while/foreach.
Currently there is no functionality to make use of the pagination in responses. This pull request attempts to fix this, by using PHP's generators to only do the API call when traversed.
The only problem is that when you'd also want to use
\ArrayAccess
it shows weird behaviour if implemented.Note that since the items are added after first recursion traversal, it also acts as a cache, and enabled the array access after traversal up until item X using a for-loop, or up until the last item when using while/foreach.
Any feedback on this implementation is welcome.