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

Pagination instructions seem incorrect #69

Open
holtkamp opened this issue Sep 20, 2018 · 1 comment
Open

Pagination instructions seem incorrect #69

holtkamp opened this issue Sep 20, 2018 · 1 comment

Comments

@holtkamp
Copy link

holtkamp commented Sep 20, 2018

The section about pagination states:

The older_id is always the ID of the first item in the current page.

However: by default Payments are sorted descending by creation date: the newest Payment is the first item in the current page, for example when GETting 5 Payments out of 10:

  • GET /v1/user/1/monetary-account/1/payment?count=5
    • Payment#10
    • Payment#9
    • Payment#8
    • Payment#7
    • Payment#6

According to the documentation, for the next page the older_id should be the ID of the first item: 10:

  • GET /v1/user/1/monetary-account/1/payment?count=5&older_id=10:
    • Payment#9
    • Payment#8
    • Payment#7
    • Payment#6
    • Payment#5

This seems incorrect: Payment#9 to Payment#6 were already returned on the first "page".

Instead, older_id should be 6, so the next page with older items would be:

  • GET /v1/user/1/monetary-account/1/payment?count=5&older_id=6:
    • Payment#5
    • Payment#4
    • Payment#3
    • Payment#2
    • Payment#1

I guess that would mean that "the older_id is always the ID of the LAST item in the current page".

A proper/complete and logical example in the documentation would clarify a lot.

I would say that the documentation should be agnostic of the order the Payments are retrieved by using an explanation like:

"The older_id is always the ID of the oldest item in the current page".

@holtkamp
Copy link
Author

holtkamp commented Apr 5, 2019

Minor bump on this, can this observation be confirmed?

@lexym lexym assigned angelomelonas and unassigned kojoru Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants