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) ([]byte, bool, error)
GetFileContents fetches the contents of the file at the given path on the repository's default branch. The bool is false if the file does not exist.