Repository navigation
Add a ResultPager object to support pagination of all Api's - #61
Merged
Merged
Conversation
The get method always prepends the baseurl before the requests path. A check was added to allow for full URLS (starting with baseurl), for following pagination links.
The api client supports the per_page github parameter for api calls. Default is NULL and lets github decide the default (currently 30). $client->setPerPage()
This is the first pass at adding a paginator class for github API requests. It only works with fetchAll() at the moment, to demonstrate the usage. Currently: $paginator = new \Github\ResultPaginator( \Github\Client [client] ); $paginator->fetchAll( [api], [method], [parameters] ); Todo's include: Paginator is not complete for all possible headers Next, Last, Previous, First apiClient should be able to return a paginator (i.e. $client->getPaginator() ) CacheHttpClient does not work (does not return Link headers)
The get method always prepends the baseurl before the requests path. A check was added to allow for full URLS (starting with baseurl), for following pagination links.
The api client supports the per_page github parameter for api calls. Default is NULL and lets github decide the default (currently 30). $client->setPerPage()
This is the first pass at adding a paginator class for github API requests. It only works with fetchAll() at the moment, to demonstrate the usage. Currently: $paginator = new \Github\ResultPaginator( \Github\Client [client] ); $paginator->fetchAll( [api], [method], [parameters] ); Todo's include: Paginator is not complete for all possible headers Next, Last, Previous, First apiClient should be able to return a paginator (i.e. $client->getPaginator() ) CacheHttpClient does not work (does not return Link headers)
Added UnitTest
Contributor
|
you should update the coding standards to follow PSR-2 |
Contributor
Author
|
@stof @docteurklein Thanks very much for the feedback! We'll be fixing all mentioned items in the morning (sorry for the obvious issues) except the ones responded on directly, which could be improved upon by discussion maybe... |
|
@cursedcoder @pilot wake up guys, accept some pull requests or deny them.. don't let them catch dust! Doesn't KNPLabs have more collaborators? |
Contributor
|
sure you took all comments in consideration ? then, ready to merge. |
Contributor
|
@verschoof apply small fix's and it will be merge |
Added spaces after comma in an array
|
@pilot Alright! Good to merge! |
docteurklein
added a commit
that referenced
this pull request
Jul 30, 2013
Add a ResultPager object to support pagination of all Api's
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This should fix #55. (close #49, close #53)
The docs have been updated to include a Pagination Support chapter that shows basic usage.