gh_rate_limits() reports on all rate limits for the authenticated user.
gh_rate_limit() reports on rate limits for previous successful request.
Further details on GitHub's API rate limit policies are available at https://docs.github.com/v3/#rate-limiting.
Usage
gh_rate_limit(
response = NULL,
.token = NULL,
.api_url = NULL,
.send_headers = NULL
)
gh_rate_limits(.token = NULL, .api_url = NULL, .send_headers = NULL)Arguments
- response
gh_responseobject from a previousghcall, rate limit values are determined from values in the response header. Optional argument, if missing a call to "GET /rate_limit" will be made.- .token
Authentication token. Defaults to
gh_token().- .api_url
Github API url (default: https://api.github.com). Used if
endpointjust contains a path. Defaults toGITHUB_API_URLenvironment variable if set.- .send_headers
Named character vector of header field values (except
Authorization, which is handled via.token). This can be used to override or augment the defaultUser-Agentheader:"https://github.com/r-lib/gh".