rate_limit: API rate limits

Description Usage Arguments Details Value Author(s) Examples

View source: R/rate_limit.r

Description

Check user- and package-level rate limits

Usage

1

Arguments

...

Other arguments passed to HTTP request functions, for example: token (an OAuth2.0 token) or key (an API key, used by default).

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

1
2
3
4
5
6
7
8
9
## Not run: 
# rate limit for anonymous requests
rate_limit()

# rate limit for authenticated requests
tkn <- imgur_login()
rate_limit(token = tkn)

## End(Not run)

imguR documentation built on May 30, 2017, 8:16 a.m.