Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No paging handling : createCollectionRequest('GET', $endpoint)->execute(); #57

Open
landall opened this issue Apr 24, 2019 · 4 comments

Comments

@landall
Copy link

landall commented Apr 24, 2019

createCollectionRequest->execute() is the same as createRequest->execute() without handling the paging problem. createCollectionRequest->getPage() and merge array until createCollectionRequest->isEnd() become true.

@krizalys
Copy link
Owner

krizalys commented May 1, 2019

@landall Thanks for reporting this. Let me try a few cases and see how/what can be fixed.

@krizalys
Copy link
Owner

krizalys commented Aug 18, 2019

@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.

@L3o-pold
Copy link

@krizalys Any update about the pagination?

@krizalys
Copy link
Owner

@L3o-pold No update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants