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

Support perPage for pagination #1

Open
khalwat opened this issue Sep 13, 2018 · 5 comments
Open

Support perPage for pagination #1

khalwat opened this issue Sep 13, 2018 · 5 comments

Comments

@khalwat
Copy link

khalwat commented Sep 13, 2018

It'd be nice in addition to being able to specify the page query string parameter, if we could also specify the perPage as per: https://docs.api.craftcms.com/pagination.html

@BenParizek
Copy link
Member

BenParizek commented Sep 13, 2018

@khalwat Just added support for that last weekend:
https://github.com/barrelstrength/craftnet-php#get-a-secondary-page-of-plugin-licenses-for-the-authenticated-craft-id-user

Have you updated to v1.0.0?
https://github.com/barrelstrength/craftnet-php/releases/tag/v1.0.0

The latest release of Craftnet CP also includes a rough pagination implementation (https://github.com/studioespresso/craft3-craftnet-cp/releases/tag/1.2.0), though it'd be nice to be able to group things a bit better before paginating too... maybe that's a GraphQL API request to P&T!

@khalwat
Copy link
Author

khalwat commented Sep 13, 2018

Right I know you support page -- I'm asking if you could add support for perPage which specifies how many items (the default is 100) appear per page.

Might be best if it was done in a generalized way via:

http://php.net/manual/en/function.http-build-query.php

...so we can pass in whatever query params we like, so as P&T adds them, the API doesn't need updating. Thoughts?

@BenParizek
Copy link
Member

Ah, got it. Read that too quickly. Yeah, happy to support it and it does make sense to generalize it. I probably won't have a chance to get to it this week. Happy to accept a pull request if you get around to it first.

@khalwat
Copy link
Author

khalwat commented Sep 13, 2018

@khalwat
Copy link
Author

khalwat commented Sep 13, 2018

Or they could add a GraphQL endpoint, and then we could do whatever we wanted in terms of queries.

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