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

Standardise documentation for pagination parameters #554

Merged
merged 4 commits into from
Apr 2, 2021
Merged

Conversation

hadley
Copy link
Member

@hadley hadley commented Apr 2, 2021

I've tried to document all parameters related to pagination in one place: the documentation for TWIT_paginate_max_id/TWIT_paginate_cursor. This means that the docs lose less specific details about the endpoint (e.g. specific page sizes and rate limits) but gain more general details about how all the pieces fit together.

@llrs I think the best place to focus on is the TWIT_paginate_max_id documentation, since that now flows out to the majority of functions in rtweet. Let me know if there's anything you think is confusing so that I can improve the wording as much as possible.

@hadley hadley requested a review from llrs April 2, 2021 16:13
@hadley hadley mentioned this pull request Apr 2, 2021
16 tasks
Comment on lines +93 to +95
#' @param since_id Provides a lower-bound for the results returned; all results
#' will have an ID greater than or equal to `since_id`. This can generally
#' be omitted.
Copy link
Member

Choose a reason for hiding this comment

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

Should it be a numeric ID or a character? Not sure I understand well what this is but each message or status has an ID this ID increases as more content is published so if one wants content later than X message can use this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, that's right. But once #510 is done, the user shouldn't need to worry about the details. e.g. the code for retrieving more tweets from a search would be something like this:

tw <- search_tweets("#rstats", n = 10000)
tw_more <- search_tweets("#rstats", max_id = max_id(tw))

And that makes me realise why you might need since_id() — this code would get all the tweets since your last request:

tw_more <- search_tweets("#rstats", max_id = since_id(tw))

I'll make all this work in upcoming PRs.

@hadley hadley merged commit 70da8db into master Apr 2, 2021
@hadley hadley deleted the since_id branch April 2, 2021 21:22
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