Description Usage Arguments Details Value See Also Examples
Returns rate limit information for one or more Twitter tokens, optionally filtered by rtweet function or specific Twitter API path(s)
1 2 3 | rate_limit(token = NULL, query = NULL, parse = TRUE)
rate_limits(token = NULL, query = NULL, parse = TRUE)
|
token |
One or more OAuth tokens. By default token = NULL
fetches a non-exhausted token from an environment variable. Find
instructions on how to create tokens and setup an environment
variable in the tokens vignette (in r, send |
query |
Specific API (path) or a character function name, e.g., query = "get_timeline", used to subset the returned data. If null, this function returns entire rate limit request object as a data frame. Otherwise, query returns specific values matching the query of interest; e.g., query = "lookup/users" returns remaining limit for user lookup requests; type = "followers/ids" returns remaining limit for follower id requests; type = "friends/ids" returns remaining limit for friend id requests. |
parse |
Logical indicating whether to parse response object into a data frame. |
If multiple tokens are provided, this function will return the names of the associated [token] applications as new variable (column) or as a named element (if parse = FALSE).
data frame with rate limit information pertaining to the limit (max allowed), remaining (specific to token), reset (minutes until reset), and reset_at (time of rate limit reset). If query is specified, only relevant rows are returned.
Other tokens:
get_tokens()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
## get all rate_limit information for default token
rate_limit()
## get rate limit info for API used in lookup_statuses
rate_limit("lookup_statuses")
## get rate limit info for specific token
token <- get_tokens()
rate_limit(token)
rate_limit(token, "search_tweets")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.