Documentation ¶
Index ¶
- type CheckIsStarredReq
- type CheckIsStarredResponse
- type Client
- func (c Client) CheckIsStarred(ctx context.Context, req *CheckIsStarredReq, opt ...requests.Option) (*CheckIsStarredResponse, error)
- func (c Client) Create(ctx context.Context, req *CreateReq, opt ...requests.Option) (*CreateResponse, error)
- func (c Client) CreateComment(ctx context.Context, req *CreateCommentReq, opt ...requests.Option) (*CreateCommentResponse, error)
- func (c Client) Delete(ctx context.Context, req *DeleteReq, opt ...requests.Option) (*DeleteResponse, error)
- func (c Client) DeleteComment(ctx context.Context, req *DeleteCommentReq, opt ...requests.Option) (*DeleteCommentResponse, error)
- func (c Client) Fork(ctx context.Context, req *ForkReq, opt ...requests.Option) (*ForkResponse, error)
- func (c Client) Get(ctx context.Context, req *GetReq, opt ...requests.Option) (*GetResponse, error)
- func (c Client) GetComment(ctx context.Context, req *GetCommentReq, opt ...requests.Option) (*GetCommentResponse, error)
- func (c Client) GetRevision(ctx context.Context, req *GetRevisionReq, opt ...requests.Option) (*GetRevisionResponse, error)
- func (c Client) List(ctx context.Context, req *ListReq, opt ...requests.Option) (*ListResponse, error)
- func (c Client) ListComments(ctx context.Context, req *ListCommentsReq, opt ...requests.Option) (*ListCommentsResponse, error)
- func (c Client) ListCommits(ctx context.Context, req *ListCommitsReq, opt ...requests.Option) (*ListCommitsResponse, error)
- func (c Client) ListForUser(ctx context.Context, req *ListForUserReq, opt ...requests.Option) (*ListForUserResponse, error)
- func (c Client) ListForks(ctx context.Context, req *ListForksReq, opt ...requests.Option) (*ListForksResponse, error)
- func (c Client) ListPublic(ctx context.Context, req *ListPublicReq, opt ...requests.Option) (*ListPublicResponse, error)
- func (c Client) ListStarred(ctx context.Context, req *ListStarredReq, opt ...requests.Option) (*ListStarredResponse, error)
- func (c Client) Star(ctx context.Context, req *StarReq, opt ...requests.Option) (*StarResponse, error)
- func (c Client) Unstar(ctx context.Context, req *UnstarReq, opt ...requests.Option) (*UnstarResponse, error)
- func (c Client) Update(ctx context.Context, req *UpdateReq, opt ...requests.Option) (*UpdateResponse, error)
- func (c Client) UpdateComment(ctx context.Context, req *UpdateCommentReq, opt ...requests.Option) (*UpdateCommentResponse, error)
- type CreateCommentReq
- type CreateCommentReqBody
- type CreateCommentResponse
- type CreateReq
- type CreateReqBody
- type CreateReqBodyFiles
- type CreateResponse
- type DeleteCommentReq
- type DeleteCommentResponse
- type DeleteReq
- type DeleteResponse
- type ForkReq
- type ForkResponse
- type GetCommentReq
- type GetCommentResponse
- type GetReq
- type GetResponse
- type GetRevisionReq
- type GetRevisionResponse
- type ListCommentsReq
- type ListCommentsResponse
- type ListCommitsReq
- type ListCommitsResponse
- type ListForUserReq
- type ListForUserResponse
- type ListForksReq
- type ListForksResponse
- type ListPublicReq
- type ListPublicResponse
- type ListReq
- type ListResponse
- type ListStarredReq
- type ListStarredResponse
- type StarReq
- type StarResponse
- type UnstarReq
- type UnstarResponse
- type UpdateCommentReq
- type UpdateCommentReqBody
- type UpdateCommentResponse
- type UpdateReq
- type UpdateReqBody
- type UpdateReqBodyFiles
- type UpdateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckIsStarredReq ¶
type CheckIsStarredReq struct { // gist_id parameter GistId string // contains filtered or unexported fields }
CheckIsStarredReq is request data for Client.CheckIsStarred
https://developer.github.com/v3/gists/#check-if-a-gist-is-starred
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*CheckIsStarredReq) HTTPRequest ¶
func (r *CheckIsStarredReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*CheckIsStarredReq) Rel ¶
func (r *CheckIsStarredReq) Rel(link string, resp *CheckIsStarredResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type CheckIsStarredResponse ¶
type CheckIsStarredResponse struct {
// contains filtered or unexported fields
}
CheckIsStarredResponse is a response for CheckIsStarred
https://developer.github.com/v3/gists/#check-if-a-gist-is-starred
func CheckIsStarred ¶
func CheckIsStarred(ctx context.Context, req *CheckIsStarredReq, opt ...requests.Option) (*CheckIsStarredResponse, error)
CheckIsStarred performs requests for "gists/check-is-starred"
Check if a gist is starred.
GET /gists/{gist_id}/star
https://developer.github.com/v3/gists/#check-if-a-gist-is-starred
func (*CheckIsStarredResponse) HTTPResponse ¶
func (r *CheckIsStarredResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*CheckIsStarredResponse) ReadResponse ¶
func (r *CheckIsStarredResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type Client ¶
Client is a set of options to apply to requests
func (Client) CheckIsStarred ¶
func (c Client) CheckIsStarred(ctx context.Context, req *CheckIsStarredReq, opt ...requests.Option) (*CheckIsStarredResponse, error)
CheckIsStarred performs requests for "gists/check-is-starred"
Check if a gist is starred.
GET /gists/{gist_id}/star
https://developer.github.com/v3/gists/#check-if-a-gist-is-starred
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) Create ¶
func (c Client) Create(ctx context.Context, req *CreateReq, opt ...requests.Option) (*CreateResponse, error)
Create performs requests for "gists/create"
Create a gist.
POST /gists
https://developer.github.com/v3/gists/#create-a-gist
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) CreateComment ¶
func (c Client) CreateComment(ctx context.Context, req *CreateCommentReq, opt ...requests.Option) (*CreateCommentResponse, error)
CreateComment performs requests for "gists/create-comment"
Create a gist comment.
POST /gists/{gist_id}/comments
https://developer.github.com/v3/gists/comments/#create-a-gist-comment
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) Delete ¶
func (c Client) Delete(ctx context.Context, req *DeleteReq, opt ...requests.Option) (*DeleteResponse, error)
Delete performs requests for "gists/delete"
Delete a gist.
DELETE /gists/{gist_id}
https://developer.github.com/v3/gists/#delete-a-gist
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) DeleteComment ¶
func (c Client) DeleteComment(ctx context.Context, req *DeleteCommentReq, opt ...requests.Option) (*DeleteCommentResponse, error)
DeleteComment performs requests for "gists/delete-comment"
Delete a gist comment.
DELETE /gists/{gist_id}/comments/{comment_id}
https://developer.github.com/v3/gists/comments/#delete-a-gist-comment
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) Fork ¶
func (c Client) Fork(ctx context.Context, req *ForkReq, opt ...requests.Option) (*ForkResponse, error)
Fork performs requests for "gists/fork"
Fork a gist.
POST /gists/{gist_id}/forks
https://developer.github.com/v3/gists/#fork-a-gist
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) Get ¶
Get performs requests for "gists/get"
Get a gist.
GET /gists/{gist_id}
https://developer.github.com/v3/gists/#get-a-gist
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) GetComment ¶
func (c Client) GetComment(ctx context.Context, req *GetCommentReq, opt ...requests.Option) (*GetCommentResponse, error)
GetComment performs requests for "gists/get-comment"
Get a gist comment.
GET /gists/{gist_id}/comments/{comment_id}
https://developer.github.com/v3/gists/comments/#get-a-gist-comment
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) GetRevision ¶
func (c Client) GetRevision(ctx context.Context, req *GetRevisionReq, opt ...requests.Option) (*GetRevisionResponse, error)
GetRevision performs requests for "gists/get-revision"
Get a gist revision.
GET /gists/{gist_id}/{sha}
https://developer.github.com/v3/gists/#get-a-gist-revision
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) List ¶
func (c Client) List(ctx context.Context, req *ListReq, opt ...requests.Option) (*ListResponse, error)
List performs requests for "gists/list"
List gists for the authenticated user.
GET /gists
https://developer.github.com/v3/gists/#list-gists-for-the-authenticated-user
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) ListComments ¶
func (c Client) ListComments(ctx context.Context, req *ListCommentsReq, opt ...requests.Option) (*ListCommentsResponse, error)
ListComments performs requests for "gists/list-comments"
List gist comments.
GET /gists/{gist_id}/comments
https://developer.github.com/v3/gists/comments/#list-gist-comments
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) ListCommits ¶
func (c Client) ListCommits(ctx context.Context, req *ListCommitsReq, opt ...requests.Option) (*ListCommitsResponse, error)
ListCommits performs requests for "gists/list-commits"
List gist commits.
GET /gists/{gist_id}/commits
https://developer.github.com/v3/gists/#list-gist-commits
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) ListForUser ¶
func (c Client) ListForUser(ctx context.Context, req *ListForUserReq, opt ...requests.Option) (*ListForUserResponse, error)
ListForUser performs requests for "gists/list-for-user"
List gists for a user.
GET /users/{username}/gists
https://developer.github.com/v3/gists/#list-gists-for-a-user
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) ListForks ¶
func (c Client) ListForks(ctx context.Context, req *ListForksReq, opt ...requests.Option) (*ListForksResponse, error)
ListForks performs requests for "gists/list-forks"
List gist forks.
GET /gists/{gist_id}/forks
https://developer.github.com/v3/gists/#list-gist-forks
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) ListPublic ¶
func (c Client) ListPublic(ctx context.Context, req *ListPublicReq, opt ...requests.Option) (*ListPublicResponse, error)
ListPublic performs requests for "gists/list-public"
List public gists.
GET /gists/public
https://developer.github.com/v3/gists/#list-public-gists
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) ListStarred ¶
func (c Client) ListStarred(ctx context.Context, req *ListStarredReq, opt ...requests.Option) (*ListStarredResponse, error)
ListStarred performs requests for "gists/list-starred"
List starred gists.
GET /gists/starred
https://developer.github.com/v3/gists/#list-starred-gists
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) Star ¶
func (c Client) Star(ctx context.Context, req *StarReq, opt ...requests.Option) (*StarResponse, error)
Star performs requests for "gists/star"
Star a gist.
PUT /gists/{gist_id}/star
https://developer.github.com/v3/gists/#star-a-gist
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) Unstar ¶
func (c Client) Unstar(ctx context.Context, req *UnstarReq, opt ...requests.Option) (*UnstarResponse, error)
Unstar performs requests for "gists/unstar"
Unstar a gist.
DELETE /gists/{gist_id}/star
https://developer.github.com/v3/gists/#unstar-a-gist
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) Update ¶
func (c Client) Update(ctx context.Context, req *UpdateReq, opt ...requests.Option) (*UpdateResponse, error)
Update performs requests for "gists/update"
Update a gist.
PATCH /gists/{gist_id}
https://developer.github.com/v3/gists/#update-a-gist
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) UpdateComment ¶
func (c Client) UpdateComment(ctx context.Context, req *UpdateCommentReq, opt ...requests.Option) (*UpdateCommentResponse, error)
UpdateComment performs requests for "gists/update-comment"
Update a gist comment.
PATCH /gists/{gist_id}/comments/{comment_id}
https://developer.github.com/v3/gists/comments/#update-a-gist-comment
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
type CreateCommentReq ¶
type CreateCommentReq struct { // gist_id parameter GistId string RequestBody CreateCommentReqBody // contains filtered or unexported fields }
CreateCommentReq is request data for Client.CreateComment
https://developer.github.com/v3/gists/comments/#create-a-gist-comment
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*CreateCommentReq) HTTPRequest ¶
func (r *CreateCommentReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*CreateCommentReq) Rel ¶
func (r *CreateCommentReq) Rel(link string, resp *CreateCommentResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type CreateCommentReqBody ¶
type CreateCommentReqBody struct { // The comment text. Body *string `json:"body"` }
CreateCommentReqBody is a request body for gists/create-comment
https://developer.github.com/v3/gists/comments/#create-a-gist-comment
type CreateCommentResponse ¶
type CreateCommentResponse struct { Data components.GistComment // contains filtered or unexported fields }
CreateCommentResponse is a response for CreateComment
https://developer.github.com/v3/gists/comments/#create-a-gist-comment
func CreateComment ¶
func CreateComment(ctx context.Context, req *CreateCommentReq, opt ...requests.Option) (*CreateCommentResponse, error)
CreateComment performs requests for "gists/create-comment"
Create a gist comment.
POST /gists/{gist_id}/comments
https://developer.github.com/v3/gists/comments/#create-a-gist-comment
func (*CreateCommentResponse) HTTPResponse ¶
func (r *CreateCommentResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*CreateCommentResponse) ReadResponse ¶
func (r *CreateCommentResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type CreateReq ¶
type CreateReq struct { RequestBody CreateReqBody // contains filtered or unexported fields }
CreateReq is request data for Client.Create
https://developer.github.com/v3/gists/#create-a-gist
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*CreateReq) HTTPRequest ¶
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
type CreateReqBody ¶
type CreateReqBody struct { // Description of the gist Description *string `json:"description,omitempty"` // Names and content for the files that make up the gist Files map[string]CreateReqBodyFiles `json:"files"` // Flag indicating whether the gist is public Public *bool `json:"public,omitempty"` }
CreateReqBody is a request body for gists/create
type CreateReqBodyFiles ¶
type CreateReqBodyFiles struct { // Content of the file Content *string `json:"content"` }
CreateReqBodyFiles is a value for CreateReqBody's Files field
type CreateResponse ¶
type CreateResponse struct { Data components.GistFull // contains filtered or unexported fields }
CreateResponse is a response for Create
https://developer.github.com/v3/gists/#create-a-gist
func (*CreateResponse) HTTPResponse ¶
func (r *CreateResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*CreateResponse) ReadResponse ¶
func (r *CreateResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type DeleteCommentReq ¶
type DeleteCommentReq struct { // gist_id parameter GistId string // comment_id parameter CommentId int64 // contains filtered or unexported fields }
DeleteCommentReq is request data for Client.DeleteComment
https://developer.github.com/v3/gists/comments/#delete-a-gist-comment
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*DeleteCommentReq) HTTPRequest ¶
func (r *DeleteCommentReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*DeleteCommentReq) Rel ¶
func (r *DeleteCommentReq) Rel(link string, resp *DeleteCommentResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type DeleteCommentResponse ¶
type DeleteCommentResponse struct {
// contains filtered or unexported fields
}
DeleteCommentResponse is a response for DeleteComment
https://developer.github.com/v3/gists/comments/#delete-a-gist-comment
func DeleteComment ¶
func DeleteComment(ctx context.Context, req *DeleteCommentReq, opt ...requests.Option) (*DeleteCommentResponse, error)
DeleteComment performs requests for "gists/delete-comment"
Delete a gist comment.
DELETE /gists/{gist_id}/comments/{comment_id}
https://developer.github.com/v3/gists/comments/#delete-a-gist-comment
func (*DeleteCommentResponse) HTTPResponse ¶
func (r *DeleteCommentResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*DeleteCommentResponse) ReadResponse ¶
func (r *DeleteCommentResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type DeleteReq ¶
type DeleteReq struct { // gist_id parameter GistId string // contains filtered or unexported fields }
DeleteReq is request data for Client.Delete
https://developer.github.com/v3/gists/#delete-a-gist
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*DeleteReq) HTTPRequest ¶
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
type DeleteResponse ¶
type DeleteResponse struct {
// contains filtered or unexported fields
}
DeleteResponse is a response for Delete
https://developer.github.com/v3/gists/#delete-a-gist
func (*DeleteResponse) HTTPResponse ¶
func (r *DeleteResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*DeleteResponse) ReadResponse ¶
func (r *DeleteResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type ForkReq ¶
type ForkReq struct { // gist_id parameter GistId string // contains filtered or unexported fields }
ForkReq is request data for Client.Fork
https://developer.github.com/v3/gists/#fork-a-gist
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*ForkReq) HTTPRequest ¶
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
type ForkResponse ¶
type ForkResponse struct { Data components.BaseGist // contains filtered or unexported fields }
ForkResponse is a response for Fork
https://developer.github.com/v3/gists/#fork-a-gist
func (*ForkResponse) HTTPResponse ¶
func (r *ForkResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*ForkResponse) ReadResponse ¶
func (r *ForkResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type GetCommentReq ¶
type GetCommentReq struct { // gist_id parameter GistId string // comment_id parameter CommentId int64 // contains filtered or unexported fields }
GetCommentReq is request data for Client.GetComment
https://developer.github.com/v3/gists/comments/#get-a-gist-comment
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*GetCommentReq) HTTPRequest ¶
func (r *GetCommentReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*GetCommentReq) Rel ¶
func (r *GetCommentReq) Rel(link string, resp *GetCommentResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type GetCommentResponse ¶
type GetCommentResponse struct { Data components.GistComment // contains filtered or unexported fields }
GetCommentResponse is a response for GetComment
https://developer.github.com/v3/gists/comments/#get-a-gist-comment
func GetComment ¶
func GetComment(ctx context.Context, req *GetCommentReq, opt ...requests.Option) (*GetCommentResponse, error)
GetComment performs requests for "gists/get-comment"
Get a gist comment.
GET /gists/{gist_id}/comments/{comment_id}
https://developer.github.com/v3/gists/comments/#get-a-gist-comment
func (*GetCommentResponse) HTTPResponse ¶
func (r *GetCommentResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*GetCommentResponse) ReadResponse ¶
func (r *GetCommentResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type GetReq ¶
type GetReq struct { // gist_id parameter GistId string // contains filtered or unexported fields }
GetReq is request data for Client.Get
https://developer.github.com/v3/gists/#get-a-gist
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*GetReq) HTTPRequest ¶
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
type GetResponse ¶
type GetResponse struct { Data components.GistFull // contains filtered or unexported fields }
GetResponse is a response for Get
https://developer.github.com/v3/gists/#get-a-gist
func (*GetResponse) HTTPResponse ¶
func (r *GetResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*GetResponse) ReadResponse ¶
func (r *GetResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type GetRevisionReq ¶
type GetRevisionReq struct { // gist_id parameter GistId string // sha parameter Sha string // contains filtered or unexported fields }
GetRevisionReq is request data for Client.GetRevision
https://developer.github.com/v3/gists/#get-a-gist-revision
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*GetRevisionReq) HTTPRequest ¶
func (r *GetRevisionReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*GetRevisionReq) Rel ¶
func (r *GetRevisionReq) Rel(link string, resp *GetRevisionResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type GetRevisionResponse ¶
type GetRevisionResponse struct { Data components.GistFull // contains filtered or unexported fields }
GetRevisionResponse is a response for GetRevision
https://developer.github.com/v3/gists/#get-a-gist-revision
func GetRevision ¶
func GetRevision(ctx context.Context, req *GetRevisionReq, opt ...requests.Option) (*GetRevisionResponse, error)
GetRevision performs requests for "gists/get-revision"
Get a gist revision.
GET /gists/{gist_id}/{sha}
func (*GetRevisionResponse) HTTPResponse ¶
func (r *GetRevisionResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*GetRevisionResponse) ReadResponse ¶
func (r *GetRevisionResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type ListCommentsReq ¶
type ListCommentsReq struct { // gist_id parameter GistId string // Results per page (max 100) PerPage *int64 // Page number of the results to fetch. Page *int64 // contains filtered or unexported fields }
ListCommentsReq is request data for Client.ListComments
https://developer.github.com/v3/gists/comments/#list-gist-comments
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*ListCommentsReq) HTTPRequest ¶
func (r *ListCommentsReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*ListCommentsReq) Rel ¶
func (r *ListCommentsReq) Rel(link string, resp *ListCommentsResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type ListCommentsResponse ¶
type ListCommentsResponse struct { Data []components.GistComment // contains filtered or unexported fields }
ListCommentsResponse is a response for ListComments
https://developer.github.com/v3/gists/comments/#list-gist-comments
func ListComments ¶
func ListComments(ctx context.Context, req *ListCommentsReq, opt ...requests.Option) (*ListCommentsResponse, error)
ListComments performs requests for "gists/list-comments"
List gist comments.
GET /gists/{gist_id}/comments
https://developer.github.com/v3/gists/comments/#list-gist-comments
func (*ListCommentsResponse) HTTPResponse ¶
func (r *ListCommentsResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*ListCommentsResponse) ReadResponse ¶
func (r *ListCommentsResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type ListCommitsReq ¶
type ListCommitsReq struct { // gist_id parameter GistId string // Results per page (max 100) PerPage *int64 // Page number of the results to fetch. Page *int64 // contains filtered or unexported fields }
ListCommitsReq is request data for Client.ListCommits
https://developer.github.com/v3/gists/#list-gist-commits
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*ListCommitsReq) HTTPRequest ¶
func (r *ListCommitsReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*ListCommitsReq) Rel ¶
func (r *ListCommitsReq) Rel(link string, resp *ListCommitsResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type ListCommitsResponse ¶
type ListCommitsResponse struct { Data []components.GistCommit // contains filtered or unexported fields }
ListCommitsResponse is a response for ListCommits
https://developer.github.com/v3/gists/#list-gist-commits
func ListCommits ¶
func ListCommits(ctx context.Context, req *ListCommitsReq, opt ...requests.Option) (*ListCommitsResponse, error)
ListCommits performs requests for "gists/list-commits"
List gist commits.
GET /gists/{gist_id}/commits
func (*ListCommitsResponse) HTTPResponse ¶
func (r *ListCommitsResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*ListCommitsResponse) ReadResponse ¶
func (r *ListCommitsResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type ListForUserReq ¶
type ListForUserReq struct { Username string /* Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ Since *string // Results per page (max 100) PerPage *int64 // Page number of the results to fetch. Page *int64 // contains filtered or unexported fields }
ListForUserReq is request data for Client.ListForUser
https://developer.github.com/v3/gists/#list-gists-for-a-user
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*ListForUserReq) HTTPRequest ¶
func (r *ListForUserReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*ListForUserReq) Rel ¶
func (r *ListForUserReq) Rel(link string, resp *ListForUserResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type ListForUserResponse ¶
type ListForUserResponse struct { Data []components.BaseGist // contains filtered or unexported fields }
ListForUserResponse is a response for ListForUser
https://developer.github.com/v3/gists/#list-gists-for-a-user
func ListForUser ¶
func ListForUser(ctx context.Context, req *ListForUserReq, opt ...requests.Option) (*ListForUserResponse, error)
ListForUser performs requests for "gists/list-for-user"
List gists for a user.
GET /users/{username}/gists
https://developer.github.com/v3/gists/#list-gists-for-a-user
func (*ListForUserResponse) HTTPResponse ¶
func (r *ListForUserResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*ListForUserResponse) ReadResponse ¶
func (r *ListForUserResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type ListForksReq ¶
type ListForksReq struct { // gist_id parameter GistId string // Results per page (max 100) PerPage *int64 // Page number of the results to fetch. Page *int64 // contains filtered or unexported fields }
ListForksReq is request data for Client.ListForks
https://developer.github.com/v3/gists/#list-gist-forks
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*ListForksReq) HTTPRequest ¶
func (r *ListForksReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*ListForksReq) Rel ¶
func (r *ListForksReq) Rel(link string, resp *ListForksResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type ListForksResponse ¶
type ListForksResponse struct { Data []components.GistFull // contains filtered or unexported fields }
ListForksResponse is a response for ListForks
https://developer.github.com/v3/gists/#list-gist-forks
func ListForks ¶
func ListForks(ctx context.Context, req *ListForksReq, opt ...requests.Option) (*ListForksResponse, error)
ListForks performs requests for "gists/list-forks"
List gist forks.
GET /gists/{gist_id}/forks
func (*ListForksResponse) HTTPResponse ¶
func (r *ListForksResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*ListForksResponse) ReadResponse ¶
func (r *ListForksResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type ListPublicReq ¶
type ListPublicReq struct { /* Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ Since *string // Results per page (max 100) PerPage *int64 // Page number of the results to fetch. Page *int64 // contains filtered or unexported fields }
ListPublicReq is request data for Client.ListPublic
https://developer.github.com/v3/gists/#list-public-gists
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*ListPublicReq) HTTPRequest ¶
func (r *ListPublicReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*ListPublicReq) Rel ¶
func (r *ListPublicReq) Rel(link string, resp *ListPublicResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type ListPublicResponse ¶
type ListPublicResponse struct { Data []components.BaseGist // contains filtered or unexported fields }
ListPublicResponse is a response for ListPublic
https://developer.github.com/v3/gists/#list-public-gists
func ListPublic ¶
func ListPublic(ctx context.Context, req *ListPublicReq, opt ...requests.Option) (*ListPublicResponse, error)
ListPublic performs requests for "gists/list-public"
List public gists.
GET /gists/public
func (*ListPublicResponse) HTTPResponse ¶
func (r *ListPublicResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*ListPublicResponse) ReadResponse ¶
func (r *ListPublicResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type ListReq ¶
type ListReq struct { /* Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ Since *string // Results per page (max 100) PerPage *int64 // Page number of the results to fetch. Page *int64 // contains filtered or unexported fields }
ListReq is request data for Client.List
https://developer.github.com/v3/gists/#list-gists-for-the-authenticated-user
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*ListReq) HTTPRequest ¶
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
type ListResponse ¶
type ListResponse struct { Data []components.BaseGist // contains filtered or unexported fields }
ListResponse is a response for List
https://developer.github.com/v3/gists/#list-gists-for-the-authenticated-user
func List ¶
List performs requests for "gists/list"
List gists for the authenticated user.
GET /gists
https://developer.github.com/v3/gists/#list-gists-for-the-authenticated-user
func (*ListResponse) HTTPResponse ¶
func (r *ListResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*ListResponse) ReadResponse ¶
func (r *ListResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type ListStarredReq ¶
type ListStarredReq struct { /* Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ Since *string // Results per page (max 100) PerPage *int64 // Page number of the results to fetch. Page *int64 // contains filtered or unexported fields }
ListStarredReq is request data for Client.ListStarred
https://developer.github.com/v3/gists/#list-starred-gists
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*ListStarredReq) HTTPRequest ¶
func (r *ListStarredReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*ListStarredReq) Rel ¶
func (r *ListStarredReq) Rel(link string, resp *ListStarredResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type ListStarredResponse ¶
type ListStarredResponse struct { Data []components.BaseGist // contains filtered or unexported fields }
ListStarredResponse is a response for ListStarred
https://developer.github.com/v3/gists/#list-starred-gists
func ListStarred ¶
func ListStarred(ctx context.Context, req *ListStarredReq, opt ...requests.Option) (*ListStarredResponse, error)
ListStarred performs requests for "gists/list-starred"
List starred gists.
GET /gists/starred
func (*ListStarredResponse) HTTPResponse ¶
func (r *ListStarredResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*ListStarredResponse) ReadResponse ¶
func (r *ListStarredResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type StarReq ¶
type StarReq struct { // gist_id parameter GistId string // contains filtered or unexported fields }
StarReq is request data for Client.Star
https://developer.github.com/v3/gists/#star-a-gist
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*StarReq) HTTPRequest ¶
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
type StarResponse ¶
type StarResponse struct {
// contains filtered or unexported fields
}
StarResponse is a response for Star
https://developer.github.com/v3/gists/#star-a-gist
func (*StarResponse) HTTPResponse ¶
func (r *StarResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*StarResponse) ReadResponse ¶
func (r *StarResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type UnstarReq ¶
type UnstarReq struct { // gist_id parameter GistId string // contains filtered or unexported fields }
UnstarReq is request data for Client.Unstar
https://developer.github.com/v3/gists/#unstar-a-gist
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*UnstarReq) HTTPRequest ¶
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
type UnstarResponse ¶
type UnstarResponse struct {
// contains filtered or unexported fields
}
UnstarResponse is a response for Unstar
https://developer.github.com/v3/gists/#unstar-a-gist
func Unstar ¶
Unstar performs requests for "gists/unstar"
Unstar a gist.
DELETE /gists/{gist_id}/star
func (*UnstarResponse) HTTPResponse ¶
func (r *UnstarResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*UnstarResponse) ReadResponse ¶
func (r *UnstarResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type UpdateCommentReq ¶
type UpdateCommentReq struct { // gist_id parameter GistId string // comment_id parameter CommentId int64 RequestBody UpdateCommentReqBody // contains filtered or unexported fields }
UpdateCommentReq is request data for Client.UpdateComment
https://developer.github.com/v3/gists/comments/#update-a-gist-comment
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*UpdateCommentReq) HTTPRequest ¶
func (r *UpdateCommentReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*UpdateCommentReq) Rel ¶
func (r *UpdateCommentReq) Rel(link string, resp *UpdateCommentResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type UpdateCommentReqBody ¶
type UpdateCommentReqBody struct { // The comment text. Body *string `json:"body"` }
UpdateCommentReqBody is a request body for gists/update-comment
https://developer.github.com/v3/gists/comments/#update-a-gist-comment
type UpdateCommentResponse ¶
type UpdateCommentResponse struct { Data components.GistComment // contains filtered or unexported fields }
UpdateCommentResponse is a response for UpdateComment
https://developer.github.com/v3/gists/comments/#update-a-gist-comment
func UpdateComment ¶
func UpdateComment(ctx context.Context, req *UpdateCommentReq, opt ...requests.Option) (*UpdateCommentResponse, error)
UpdateComment performs requests for "gists/update-comment"
Update a gist comment.
PATCH /gists/{gist_id}/comments/{comment_id}
https://developer.github.com/v3/gists/comments/#update-a-gist-comment
func (*UpdateCommentResponse) HTTPResponse ¶
func (r *UpdateCommentResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*UpdateCommentResponse) ReadResponse ¶
func (r *UpdateCommentResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type UpdateReq ¶
type UpdateReq struct { // gist_id parameter GistId string RequestBody UpdateReqBody // contains filtered or unexported fields }
UpdateReq is request data for Client.Update
https://developer.github.com/v3/gists/#update-a-gist
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*UpdateReq) HTTPRequest ¶
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
type UpdateReqBody ¶
type UpdateReqBody struct { // Description of the gist Description *string `json:"description,omitempty"` // Names of files to be updated Files map[string]UpdateReqBodyFiles `json:"files,omitempty"` }
UpdateReqBody is a request body for gists/update
type UpdateReqBodyFiles ¶
type UpdateReqBodyFiles struct { // The new content of the file Content *string `json:"content,omitempty"` // The new filename for the file Filename *string `json:"filename,omitempty"` }
UpdateReqBodyFiles is a value for UpdateReqBody's Files field
type UpdateResponse ¶
type UpdateResponse struct { Data components.GistFull // contains filtered or unexported fields }
UpdateResponse is a response for Update
https://developer.github.com/v3/gists/#update-a-gist
func (*UpdateResponse) HTTPResponse ¶
func (r *UpdateResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*UpdateResponse) ReadResponse ¶
func (r *UpdateResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.