diff options
Diffstat (limited to 'vendor/github.com/google/go-github/github/gists.go')
-rw-r--r-- | vendor/github.com/google/go-github/github/gists.go | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/vendor/github.com/google/go-github/github/gists.go b/vendor/github.com/google/go-github/github/gists.go index 81f55b1..f727f54 100644 --- a/vendor/github.com/google/go-github/github/gists.go +++ b/vendor/github.com/google/go-github/github/gists.go @@ -13,7 +13,7 @@ import ( // GistsService handles communication with the Gist related // methods of the GitHub API. // -// GitHub API docs: http://developer.github.com/v3/gists/ +// GitHub API docs: https://developer.github.com/v3/gists/ type GistsService service // Gist represents a GitHub's gist. @@ -92,7 +92,7 @@ type GistListOptions struct { // is authenticated, it will returns all gists for the authenticated // user. // -// GitHub API docs: http://developer.github.com/v3/gists/#list-gists +// GitHub API docs: https://developer.github.com/v3/gists/#list-gists func (s *GistsService) List(user string, opt *GistListOptions) ([]*Gist, *Response, error) { var u string if user != "" { @@ -121,7 +121,7 @@ func (s *GistsService) List(user string, opt *GistListOptions) ([]*Gist, *Respon // ListAll lists all public gists. // -// GitHub API docs: http://developer.github.com/v3/gists/#list-gists +// GitHub API docs: https://developer.github.com/v3/gists/#list-gists func (s *GistsService) ListAll(opt *GistListOptions) ([]*Gist, *Response, error) { u, err := addOptions("gists/public", opt) if err != nil { @@ -144,7 +144,7 @@ func (s *GistsService) ListAll(opt *GistListOptions) ([]*Gist, *Response, error) // ListStarred lists starred gists of authenticated user. // -// GitHub API docs: http://developer.github.com/v3/gists/#list-gists +// GitHub API docs: https://developer.github.com/v3/gists/#list-gists func (s *GistsService) ListStarred(opt *GistListOptions) ([]*Gist, *Response, error) { u, err := addOptions("gists/starred", opt) if err != nil { @@ -167,7 +167,7 @@ func (s *GistsService) ListStarred(opt *GistListOptions) ([]*Gist, *Response, er // Get a single gist. // -// GitHub API docs: http://developer.github.com/v3/gists/#get-a-single-gist +// GitHub API docs: https://developer.github.com/v3/gists/#get-a-single-gist func (s *GistsService) Get(id string) (*Gist, *Response, error) { u := fmt.Sprintf("gists/%v", id) req, err := s.client.NewRequest("GET", u, nil) @@ -180,7 +180,7 @@ func (s *GistsService) Get(id string) (*Gist, *Response, error) { return nil, resp, err } - return gist, resp, err + return gist, resp, nil } // GetRevision gets a specific revision of a gist. @@ -198,12 +198,12 @@ func (s *GistsService) GetRevision(id, sha string) (*Gist, *Response, error) { return nil, resp, err } - return gist, resp, err + return gist, resp, nil } // Create a gist for authenticated user. // -// GitHub API docs: http://developer.github.com/v3/gists/#create-a-gist +// GitHub API docs: https://developer.github.com/v3/gists/#create-a-gist func (s *GistsService) Create(gist *Gist) (*Gist, *Response, error) { u := "gists" req, err := s.client.NewRequest("POST", u, gist) @@ -216,12 +216,12 @@ func (s *GistsService) Create(gist *Gist) (*Gist, *Response, error) { return nil, resp, err } - return g, resp, err + return g, resp, nil } // Edit a gist. // -// GitHub API docs: http://developer.github.com/v3/gists/#edit-a-gist +// GitHub API docs: https://developer.github.com/v3/gists/#edit-a-gist func (s *GistsService) Edit(id string, gist *Gist) (*Gist, *Response, error) { u := fmt.Sprintf("gists/%v", id) req, err := s.client.NewRequest("PATCH", u, gist) @@ -234,7 +234,7 @@ func (s *GistsService) Edit(id string, gist *Gist) (*Gist, *Response, error) { return nil, resp, err } - return g, resp, err + return g, resp, nil } // ListCommits lists commits of a gist. @@ -258,7 +258,7 @@ func (s *GistsService) ListCommits(id string) ([]*GistCommit, *Response, error) // Delete a gist. // -// GitHub API docs: http://developer.github.com/v3/gists/#delete-a-gist +// GitHub API docs: https://developer.github.com/v3/gists/#delete-a-gist func (s *GistsService) Delete(id string) (*Response, error) { u := fmt.Sprintf("gists/%v", id) req, err := s.client.NewRequest("DELETE", u, nil) @@ -270,7 +270,7 @@ func (s *GistsService) Delete(id string) (*Response, error) { // Star a gist on behalf of authenticated user. // -// GitHub API docs: http://developer.github.com/v3/gists/#star-a-gist +// GitHub API docs: https://developer.github.com/v3/gists/#star-a-gist func (s *GistsService) Star(id string) (*Response, error) { u := fmt.Sprintf("gists/%v/star", id) req, err := s.client.NewRequest("PUT", u, nil) @@ -282,7 +282,7 @@ func (s *GistsService) Star(id string) (*Response, error) { // Unstar a gist on a behalf of authenticated user. // -// Github API docs: http://developer.github.com/v3/gists/#unstar-a-gist +// Github API docs: https://developer.github.com/v3/gists/#unstar-a-gist func (s *GistsService) Unstar(id string) (*Response, error) { u := fmt.Sprintf("gists/%v/star", id) req, err := s.client.NewRequest("DELETE", u, nil) @@ -294,7 +294,7 @@ func (s *GistsService) Unstar(id string) (*Response, error) { // IsStarred checks if a gist is starred by authenticated user. // -// GitHub API docs: http://developer.github.com/v3/gists/#check-if-a-gist-is-starred +// GitHub API docs: https://developer.github.com/v3/gists/#check-if-a-gist-is-starred func (s *GistsService) IsStarred(id string) (bool, *Response, error) { u := fmt.Sprintf("gists/%v/star", id) req, err := s.client.NewRequest("GET", u, nil) @@ -308,7 +308,7 @@ func (s *GistsService) IsStarred(id string) (bool, *Response, error) { // Fork a gist. // -// GitHub API docs: http://developer.github.com/v3/gists/#fork-a-gist +// GitHub API docs: https://developer.github.com/v3/gists/#fork-a-gist func (s *GistsService) Fork(id string) (*Gist, *Response, error) { u := fmt.Sprintf("gists/%v/forks", id) req, err := s.client.NewRequest("POST", u, nil) @@ -322,7 +322,7 @@ func (s *GistsService) Fork(id string) (*Gist, *Response, error) { return nil, resp, err } - return g, resp, err + return g, resp, nil } // ListForks lists forks of a gist. |