onedrive-php-sdk
onedrive-php-sdk copied to clipboard
No paging handling : createCollectionRequest('GET', $endpoint)->execute();
createCollectionRequest->execute() is the same as createRequest->execute() without handling the paging problem. createCollectionRequest->getPage() and merge array until createCollectionRequest->isEnd() become true.
@landall Thanks for reporting this. Let me try a few cases and see how/what can be fixed.
@landall I'm working on a long-term support for pagination based on PHP iterators.
Meanwhile, I just released version 2.3.0, which added support for $options
to Krizalys\Onedrive\Proxy::getChildren()
. One option, top
, allows you to set the maximum number of children to return. Example:
https://github.com/krizalys/onedrive-php-sdk/blob/master/src/Proxy/DriveItemProxy.php#L314-L321
The default is 200, but OneDrive seems accept much higher values (millions), though you may experience memory issues. As you can see from the example above, you may also be able to leverage the orderBy
option to pull certain children closer to the top and lower the number of children required.
Give it a try and let me know if it is an acceptable workaround to your issue.
@krizalys Any update about the pagination?
@L3o-pold No update.