Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrUnexpectedAPIResponse = errors.New("unexpected API response") ErrRateLimited = errors.New("rate limit exceeded") )
Functions ¶
This section is empty.
Types ¶
type GithubClient ¶
type GithubClient struct {
// contains filtered or unexported fields
}
func NewGithubClient ¶
func NewGithubClient(token string) *GithubClient
NewGithubClient creates a client for the github API, if the token is empty then requests are unauthenticated.
func (*GithubClient) GetFileContents ¶ added in v0.17.0
func (c *GithubClient) GetFileContents(owner string, repo string, path string, ref string) ([]byte, bool, error)
GetFileContents fetches the contents of the file at the given path on the given ref, or the repository's default branch when it's empty. The bool is false if the file does not exist.