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 pagination by min_id and max_id #14776

Merged
merged 3 commits into from
Sep 12, 2020

Conversation

tateisu
Copy link
Contributor

@tateisu tateisu commented Sep 12, 2020

I want to add "read gap from bottom" feature to my app.

but current API does not support both min_id and max_id is specified.

example:

://mstdn.jp/api/v1/timelines/public?limit=80&min_id=104851024371243870&max_id=104851024489466483
104851024489466483 (max_id parameter)
104851024371243870 (min_id parameter)

response is not in min-max range.
104851030810789863
104851030584864650
104851030520828910
104851030397708486
104851030354767343

Pagination in some Mastodon APIs has no relation between the content ID and the pagination ID.
(example: user's follow list is paginated by follow.id, but it is not exposed in the response.)
in this case the app cannot filter the data using the content ID and pagination ID.

Copy link
Contributor

@ClearlyClaire ClearlyClaire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 100% sure this should be called max_id as it is similar to the relation since_id has to max_id, but it is a useful feature and should not break anything.

@Gargron Gargron merged commit fa0c71f into mastodon:master Sep 12, 2020
@tateisu
Copy link
Contributor Author

tateisu commented Sep 14, 2020

thenameisnigel-old pushed a commit to ChatterlyOSE/Chatterly that referenced this pull request Sep 18, 2020
* allow pagination by min_id and max_id

* also AccountConversation allows min_id,max_id pair

* also home,list TL allows min_id,max_id pair
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.

None yet

3 participants