create.github.context: Create a github context object.

Description Usage Arguments Details Value

Description

If create.github.context is called without some of client_id, client_secret or access_token, then some API calls will be unavailable, and more severe rate limiting will be in effect. Refer to http://developer.github.com for more details.

Usage

1
2
3
create.github.context(api_url = "https://api.github.com", client_id = NULL,
  client_secret = NULL, access_token = NULL, personal_token = NULL,
  max_etags = 10000, verbose = FALSE)

Arguments

api_url

the base URL

client_id

the github client ID

client_secret

the github client secret

access_token

the github access token

personal_token

the personal access token given by github via the /authorizations api

max_etags

the maximum number of entries to cache in the context

verbose

if TRUE, passes verbose() to httr configuration

Details

If the environment variable GITHUB_PAT is set, then rgithub will attempt to authenticate using the value of that variable as a personal authentication token.

create.github.context stores the context last created in an environment. If any of the github API functions are called without a context, this context is used instead. (if no context has been created, an unauthenticated context will be created)

Value

a github context object that is used in every github API call issued by this library.


cscheid/rgithub documentation built on May 14, 2019, 12:07 p.m.