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

Allow customization of pagination API #18

Merged

Conversation

mike-north
Copy link
Collaborator

Please merge #20 first

Currently this addon has the following request payload structure hardcoded

{
  per_page: 10,
  page: 14
}

This PR allows customization of these two parameters, so that you could work with an API that expects to recieve something like

{
  per: 10,
  p: 14
}

@hhff
Copy link
Collaborator

hhff commented May 19, 2015

This is awesome @truenorth ! Thankyou. Can you update the README with this? Under "Advanced Usage" for infinityModel makes most sense I think 👍

Might be worth allowing the developer to customize where ember infinity looks for the total_pages in the server response too - but I'm happy to merge this regardless.

@mike-north
Copy link
Collaborator Author

Sure I'll add more complete customization, test coverage and documentation

@hhff
Copy link
Collaborator

hhff commented May 19, 2015

Thankyou mike - this will be awesome!
On Wed, 20 May 2015 at 5:10 am Mike North [email protected] wrote:

Sure I'll add more complete customization, test coverage and
documentation. Sent from Yahoo Mail for iPhoneAt May 19, 2015, 01:57:40,
Hugh Francis wrote:This is awesome @truenorth ! Thankyou. Can you update
the README with this? Under "Advanced Usage" for infinityModel makes most
sense I think

Might be worth allowing the developer to customize where ember infinity
looks for the total_pages in the server response too - but I'm happy to
merge this regardless.

—Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub
#18 (comment).

@mike-north mike-north changed the title Allow customization of request params Allow customization of pagination API May 20, 2015
@mike-north
Copy link
Collaborator Author

@hhff this should be ready to go now

@mike-north mike-north mentioned this pull request May 20, 2015
@hhff
Copy link
Collaborator

hhff commented May 21, 2015

LGTM 👍 Please rebase

@mike-north mike-north force-pushed the customize-pagination-params branch from 6e82daf to 7f10048 Compare May 21, 2015 01:16
@mike-north
Copy link
Collaborator Author

@hhff Squashed. Please make sure to merge #20 first and then this PR will just be one commit

hhff added a commit that referenced this pull request May 21, 2015
@hhff hhff merged commit 848faaf into adopted-ember-addons:master May 21, 2015
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

Successfully merging this pull request may close these issues.

2 participants