diff options
Diffstat (limited to 'vendor/github.com/google/go-github/github/doc.go')
-rw-r--r-- | vendor/github.com/google/go-github/github/doc.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/vendor/github.com/google/go-github/github/doc.go b/vendor/github.com/google/go-github/github/doc.go index 2b61068..659dd82 100644 --- a/vendor/github.com/google/go-github/github/doc.go +++ b/vendor/github.com/google/go-github/github/doc.go @@ -86,6 +86,21 @@ To detect an API rate limit error, you can check if its type is *github.RateLimi Learn more about GitHub rate limiting at http://developer.github.com/v3/#rate-limiting. +Accepted Status + +Some endpoints may return a 202 Accepted status code, meaning that the +information required is not yet ready and was scheduled to be gathered on +the GitHub side. Methods known to behave like this are documented specifying +this behavior. + +To detect this condition of error, you can check if its type is +*github.AcceptedError: + + stats, _, err := client.Repositories.ListContributorsStats(org, repo) + if _, ok := err.(*github.AcceptedError); ok { + log.Println("scheduled on GitHub side") + } + Conditional Requests The GitHub API has good support for conditional requests which will help |