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

Unable to increase per_page limit when listing all zones #26

Open
seanhamlin opened this issue Mar 10, 2017 · 2 comments
Open

Unable to increase per_page limit when listing all zones #26

seanhamlin opened this issue Mar 10, 2017 · 2 comments

Comments

@seanhamlin
Copy link

I have the need to increase the per_page limit to be 1000, to which decreases by application's report time significantly.

Currently the method listZones does not allow overriding this value, and the other more raw method makeListingRequest is protected.

Ideal solution

per_page is allowed to be set by the application, and not the library.

@aweingarten
Copy link
Contributor

This should probably be refactored like listZones to use makeListingRequest which will automatically get all the pages in chunks of 50/page.
https://github.com/d8-contrib-modules/cloudflarephpsdk/blob/master/src/ApiEndpoints/ZoneApi.php#L40

Api doesn't allow more that that per page! In some cases they do allow 100. Unfortunately you can't do 1000 in a single request:
https://github.com/d8-contrib-modules/cloudflarephpsdk/blob/master/src/ApiEndpoints/CloudFlareAPI.php#L72

@seanhamlin
Copy link
Author

In my particular case, I can use this higher pagination limit, I am unsure on what grants me this ability, but it sure is helpful when you have access to a lot of zones.

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

2 participants