Skip to contents

Calls gh_api() and returns NULL instead of an error, for the requests that may fail without stopping the collection: a repository whose traffic the token cannot read, or a file that does not exist.

Usage

gh_get(endpoint, ..., token = NULL)

Arguments

endpoint

The endpoint, such as "/user" or "POST /graphql". Its placeholders take the values of the same names in ....

...

The values of the placeholders and the parameters of the request, passed to gh::gh().

token

GitHub token, or NULL for the one that gh finds.

Value

The answer of GitHub, or NULL when GitHub answers with an error.

Examples

if (FALSE) { # \dontrun{
rghcard:::gh_get("/repos/{owner}/{repo}/traffic/views", owner = "octocat",
                 repo = "Hello-World")
} # }