Skip to content

Pagination Customization Docs Confusing #291

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

Closed
jamesarosen opened this issue Aug 22, 2018 · 1 comment
Closed

Pagination Customization Docs Confusing #291

jamesarosen opened this issue Aug 22, 2018 · 1 comment

Comments

@jamesarosen
Copy link

The current pagination docs are a bit confusing. They suggest

JsonApiClient::Paginating::Paginator.page_param = "page[number]"
JsonApiClient::Paginating::Paginator.per_page_param = "page[size]"

But JsonApiClient::Query::Builder#pagination_params wraps those in a page: {…}, resulting in URLs like

?page[page[number]]=2&page[page[size]]=20

Without overriding #pagination_params, there's no way to get rid of the page[…] wrapping. Moving the wrapping to page_param and per_page_param probably requires a major version bump. In the meantime, a little more documentation would help.

senid231 added a commit to senid231/json_api_client that referenced this issue Oct 3, 2018
senid231 added a commit that referenced this issue Oct 4, 2018
…verride-example

#291 import README - pagination override examples
@senid231
Copy link
Member

Readme fixed.
Feel free to comment here if needed.

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