-
-
Notifications
You must be signed in to change notification settings - Fork 598
allow to set the requested page on all endpoints #586
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
Conversation
At the moment it's not possible to request another page on all endpoints (search for example). With this change the requested `page` can be set the same way like the `per_page`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many endpoints allow to specify a $param
which allow pagination. See https://github.com/KnpLabs/php-github-api/blob/master/lib/Github/Api/CurrentUser.php#L179
lib/Github/Api/AbstractApi.php
Outdated
* | ||
* @var null|int | ||
*/ | ||
protected $page; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not private?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same why $perPage
isn't private - it should be extendable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would make $perPage private to if it didn't break BC.
It is easier to change from private to protected than the other way around.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping @Gummibeer, please change this property to private
@Nyholm yes, but by far not all - and I think there are two ways: define the page like in this PR or allow the |
I do like the idea of solving this for all apis. Do all endpoints support pagination? |
Every endpoint that returns more than one entry. |
@Einenlum any chance to get it merged and released soon? |
ping @acrobat |
Only a minor comment left, but after that it looks good to merge! |
Sorry wrong button :( |
Done |
Yes indeed! Last comments were fixed so merging! Thanks @Gummibeer! |
At the moment it's not possible to request another page on all endpoints (search for example). With this change the requested
page
can be set the same way like theper_page
.