Description Usage Arguments Details Value Examples
This function initiates the OAuth authentication code grant flow with GitHub. The user will be redirected to GitHub's login page to enter a user name and password. Once complete the user can close the window and this function returns a token which can be used for all calls to the githapi API.
1 2 3 4 5 6 7 8 9 |
token |
(string, optional) A personal access token. If |
oauth |
(string, optional) The base URL for for the OAuth endpoint. Can
be set in the |
proxy |
(character, optional) The proxy server to use to connect to the
github API. If |
id |
(string, optional) The application ID for accessing GitHub. Can be
set in the |
secret |
(string, optional) The secret for the application to access
GitHub. Can be set in the |
cache |
(boolean or string, optional) The location to store a cached
token. If |
refresh |
(boolean, optional) Whether to force the refresh of the cached token. Default: FALSE. |
For non-interactive processes a personal access token can be specified,
either as an R option ("github.token"
) or as an environment variable
(either GITHAPI_TOKEN
, GITHUB_PAT
, or GITHUB_TOKEN
).
A token which is either a string, for a personal access token, or a httr::Token object for an OAuth token.
1 2 3 4 5 6 | ## Not run:
token <- gh_token()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.