rate_limit {imguR} | R Documentation |
API rate limits
Description
Check user- and package-level rate limits
Usage
rate_limit(...)
Arguments
... |
Other arguments passed to HTTP request functions, for example: |
Details
This function returns a list detailing user- and package-level API rate limits. All calls to the API deduct one unit from rate limits, except for upload_image
, which deducts 10. Rate limits are lower for anonymous requests than for authenticated requests. Limits exist at the user level and at the package level. The user-level rate limit are automatically reset periodically. The response object documents when that limit will be reset.
Rate limits are automatically checked during each request. Options can be set for low remaining usage warnings. By default (when the package is loaded) those options are: options(imgur_user_rate_warning = 20)
and options(imgur_client_rate_warning = 100)
.
Value
An object of class “imgur_basic”.
Author(s)
Thomas J. Leeper
Examples
## Not run:
# rate limit for anonymous requests
rate_limit()
# rate limit for authenticated requests
tkn <- imgur_login()
rate_limit(token = tkn)
## End(Not run)