aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/google/go-github/github/doc.go
diff options
context:
space:
mode:
authorNiall Sheridan <nsheridan@gmail.com>2016-12-28 21:18:36 +0000
committerNiall Sheridan <nsheridan@gmail.com>2016-12-28 21:18:36 +0000
commit73ef85bc5db590c22689e11be20737a3dd88168f (patch)
treefe393a6f0776bca1889b2113ab341a2922e25d10 /vendor/github.com/google/go-github/github/doc.go
parent9e573e571fe878ed32947cae5a6d43cb5d72d3bb (diff)
Update dependencies
Diffstat (limited to 'vendor/github.com/google/go-github/github/doc.go')
-rw-r--r--vendor/github.com/google/go-github/github/doc.go15
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