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

Add support for min_id pagination parameter #50

Merged
merged 3 commits into from
Jun 18, 2019
Merged

Conversation

shinmili
Copy link
Contributor

#39.

@glacasa
Copy link
Owner

glacasa commented Jun 16, 2019

Thanks for all these PRs, I'm gonna loot at them 👍


You can always let the `limit` to its default value or define the number of items you want to load.

All the methods can be called with the 3 params `maxId`, `sinceId`, and `limit`, or using an `ArrayOptions` object. The result will be the same. Only the methods with `ArrayOptions` are presented below.
Note that the 3-parameter overloads don't have `minId` for backward compatibility. Use the overloads with `ArrayOptions` if you need it.
Copy link
Owner

Choose a reason for hiding this comment

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

Do you think we should mark those 3-parameters methods obsolete in a future (major) release ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think so. They can be easily rewritten to use ArrayOptions and their advantage is just a little convenience. Furthermore, if min_id is present, the other id parameters seem to be ignored (mastodon/mastodon#8736), so arbitrarily specifyable parameters can be misleading to users. Class can handle it.

@glacasa glacasa merged commit 174d8ba into glacasa:master Jun 18, 2019
@shinmili shinmili deleted the min_id branch June 19, 2019 02:52
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