githubRestGET: Interface for accessing GitHub REST API

Description Usage Arguments Details Value See Also

Description

This function allows users to access (GET) content from the GitHub API in a flexible way. The rGithubClient package provides convenience methods to access certain types of content - this function is provided to allow users to access any other API that they choose.

Usage

1
2
3
  githubRestGET(uri, endpoint = .getGithubCache("githubEndpoint"), 
                .opts = .getGithubCache("opts"), 
                httpheader = .getGithubCache("httpheader"), ...)

Arguments

uri

uri of the API request, e.g. "/repos/brian-bot/rGithubClient"

endpoint

endpoint to access uri from, e.g. "https://api.github.com/"

.opts

additional options to be passed on to getURL

httpheader

httpheader to be passed onto getURL

...

other named parameters to be passed onto getURL

Details

Defaults to recieving content in JSON format (Accept="application/json") which is, in turn, converted into a list via the RJSONIO function fromJSON. If authorization is set via setGithubAuth, the token specific to the rGithubClient is used for subsequent calls to the API via this function.

Value

Typically a list which is the content returned from the GitHub API and converted via fromJSON.

See Also

getPermlink, githubRepo, getRepo, sourceRepoFile, view


brian-bot/rGithubClient documentation built on May 13, 2019, 5:12 a.m.