Versions in this module Expand all Collapse all v0 v0.8.0 Aug 13, 2020 Changes in this version + type CheckIsStarredReq struct + GistId string + func (r *CheckIsStarredReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) + func (r *CheckIsStarredReq) Rel(link string, resp *CheckIsStarredResponse) bool + type CheckIsStarredResponse struct + func CheckIsStarred(ctx context.Context, req *CheckIsStarredReq, opt ...requests.Option) (*CheckIsStarredResponse, error) + func (r *CheckIsStarredResponse) HTTPResponse() *http.Response + func (r *CheckIsStarredResponse) ReadResponse(resp *http.Response) error + type Client []requests.Option + func NewClient(opt ...requests.Option) 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 struct + GistId string + RequestBody CreateCommentReqBody + func (r *CreateCommentReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) + func (r *CreateCommentReq) Rel(link string, resp *CreateCommentResponse) bool + type CreateCommentReqBody struct + Body *string + type CreateCommentResponse struct + Data components.GistComment + func CreateComment(ctx context.Context, req *CreateCommentReq, opt ...requests.Option) (*CreateCommentResponse, error) + func (r *CreateCommentResponse) HTTPResponse() *http.Response + func (r *CreateCommentResponse) ReadResponse(resp *http.Response) error + type CreateReq struct + RequestBody CreateReqBody + func (r *CreateReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) + func (r *CreateReq) Rel(link string, resp *CreateResponse) bool + type CreateReqBody struct + Description *string + Files map[string]CreateReqBodyFiles + Public *bool + type CreateReqBodyFiles struct + Content *string + type CreateResponse struct + Data components.GistFull + func Create(ctx context.Context, req *CreateReq, opt ...requests.Option) (*CreateResponse, error) + func (r *CreateResponse) HTTPResponse() *http.Response + func (r *CreateResponse) ReadResponse(resp *http.Response) error + type DeleteCommentReq struct + CommentId int64 + GistId string + func (r *DeleteCommentReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) + func (r *DeleteCommentReq) Rel(link string, resp *DeleteCommentResponse) bool + type DeleteCommentResponse struct + func DeleteComment(ctx context.Context, req *DeleteCommentReq, opt ...requests.Option) (*DeleteCommentResponse, error) + func (r *DeleteCommentResponse) HTTPResponse() *http.Response + func (r *DeleteCommentResponse) ReadResponse(resp *http.Response) error + type DeleteReq struct + GistId string + func (r *DeleteReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) + func (r *DeleteReq) Rel(link string, resp *DeleteResponse) bool + type DeleteResponse struct + func Delete(ctx context.Context, req *DeleteReq, opt ...requests.Option) (*DeleteResponse, error) + func (r *DeleteResponse) HTTPResponse() *http.Response + func (r *DeleteResponse) ReadResponse(resp *http.Response) error + type ForkReq struct + GistId string + func (r *ForkReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) + func (r *ForkReq) Rel(link string, resp *ForkResponse) bool + type ForkResponse struct + Data components.BaseGist + func Fork(ctx context.Context, req *ForkReq, opt ...requests.Option) (*ForkResponse, error) + func (r *ForkResponse) HTTPResponse() *http.Response + func (r *ForkResponse) ReadResponse(resp *http.Response) error + type GetCommentReq struct + CommentId int64 + GistId string + func (r *GetCommentReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) + func (r *GetCommentReq) Rel(link string, resp *GetCommentResponse) bool + type GetCommentResponse struct + Data components.GistComment + func GetComment(ctx context.Context, req *GetCommentReq, opt ...requests.Option) (*GetCommentResponse, error) + func (r *GetCommentResponse) HTTPResponse() *http.Response + func (r *GetCommentResponse) ReadResponse(resp *http.Response) error + type GetReq struct + GistId string + func (r *GetReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) + func (r *GetReq) Rel(link string, resp *GetResponse) bool + type GetResponse struct + Data components.GistFull + func Get(ctx context.Context, req *GetReq, opt ...requests.Option) (*GetResponse, error) + func (r *GetResponse) HTTPResponse() *http.Response + func (r *GetResponse) ReadResponse(resp *http.Response) error + type GetRevisionReq struct + GistId string + Sha string + func (r *GetRevisionReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) + func (r *GetRevisionReq) Rel(link string, resp *GetRevisionResponse) bool + type GetRevisionResponse struct + Data components.GistFull + func GetRevision(ctx context.Context, req *GetRevisionReq, opt ...requests.Option) (*GetRevisionResponse, error) + func (r *GetRevisionResponse) HTTPResponse() *http.Response + func (r *GetRevisionResponse) ReadResponse(resp *http.Response) error + type ListCommentsReq struct + GistId string + Page *int64 + PerPage *int64 + func (r *ListCommentsReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) + func (r *ListCommentsReq) Rel(link string, resp *ListCommentsResponse) bool + type ListCommentsResponse struct + Data []components.GistComment + func ListComments(ctx context.Context, req *ListCommentsReq, opt ...requests.Option) (*ListCommentsResponse, error) + func (r *ListCommentsResponse) HTTPResponse() *http.Response + func (r *ListCommentsResponse) ReadResponse(resp *http.Response) error + type ListCommitsReq struct + GistId string + Page *int64 + PerPage *int64 + func (r *ListCommitsReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) + func (r *ListCommitsReq) Rel(link string, resp *ListCommitsResponse) bool + type ListCommitsResponse struct + Data []components.GistCommit + func ListCommits(ctx context.Context, req *ListCommitsReq, opt ...requests.Option) (*ListCommitsResponse, error) + func (r *ListCommitsResponse) HTTPResponse() *http.Response + func (r *ListCommitsResponse) ReadResponse(resp *http.Response) error + type ListForUserReq struct + Page *int64 + PerPage *int64 + Since *string + Username string + func (r *ListForUserReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) + func (r *ListForUserReq) Rel(link string, resp *ListForUserResponse) bool + type ListForUserResponse struct + Data []components.BaseGist + func ListForUser(ctx context.Context, req *ListForUserReq, opt ...requests.Option) (*ListForUserResponse, error) + func (r *ListForUserResponse) HTTPResponse() *http.Response + func (r *ListForUserResponse) ReadResponse(resp *http.Response) error + type ListForksReq struct + GistId string + Page *int64 + PerPage *int64 + func (r *ListForksReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) + func (r *ListForksReq) Rel(link string, resp *ListForksResponse) bool + type ListForksResponse struct + Data []components.GistFull + func ListForks(ctx context.Context, req *ListForksReq, opt ...requests.Option) (*ListForksResponse, error) + func (r *ListForksResponse) HTTPResponse() *http.Response + func (r *ListForksResponse) ReadResponse(resp *http.Response) error + type ListPublicReq struct + Page *int64 + PerPage *int64 + Since *string + func (r *ListPublicReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) + func (r *ListPublicReq) Rel(link string, resp *ListPublicResponse) bool + type ListPublicResponse struct + Data []components.BaseGist + func ListPublic(ctx context.Context, req *ListPublicReq, opt ...requests.Option) (*ListPublicResponse, error) + func (r *ListPublicResponse) HTTPResponse() *http.Response + func (r *ListPublicResponse) ReadResponse(resp *http.Response) error + type ListReq struct + Page *int64 + PerPage *int64 + Since *string + func (r *ListReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) + func (r *ListReq) Rel(link string, resp *ListResponse) bool + type ListResponse struct + Data []components.BaseGist + func List(ctx context.Context, req *ListReq, opt ...requests.Option) (*ListResponse, error) + func (r *ListResponse) HTTPResponse() *http.Response + func (r *ListResponse) ReadResponse(resp *http.Response) error + type ListStarredReq struct + Page *int64 + PerPage *int64 + Since *string + func (r *ListStarredReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) + func (r *ListStarredReq) Rel(link string, resp *ListStarredResponse) bool + type ListStarredResponse struct + Data []components.BaseGist + func ListStarred(ctx context.Context, req *ListStarredReq, opt ...requests.Option) (*ListStarredResponse, error) + func (r *ListStarredResponse) HTTPResponse() *http.Response + func (r *ListStarredResponse) ReadResponse(resp *http.Response) error + type StarReq struct + GistId string + func (r *StarReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) + func (r *StarReq) Rel(link string, resp *StarResponse) bool + type StarResponse struct + func Star(ctx context.Context, req *StarReq, opt ...requests.Option) (*StarResponse, error) + func (r *StarResponse) HTTPResponse() *http.Response + func (r *StarResponse) ReadResponse(resp *http.Response) error + type UnstarReq struct + GistId string + func (r *UnstarReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) + func (r *UnstarReq) Rel(link string, resp *UnstarResponse) bool + type UnstarResponse struct + func Unstar(ctx context.Context, req *UnstarReq, opt ...requests.Option) (*UnstarResponse, error) + func (r *UnstarResponse) HTTPResponse() *http.Response + func (r *UnstarResponse) ReadResponse(resp *http.Response) error + type UpdateCommentReq struct + CommentId int64 + GistId string + RequestBody UpdateCommentReqBody + func (r *UpdateCommentReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) + func (r *UpdateCommentReq) Rel(link string, resp *UpdateCommentResponse) bool + type UpdateCommentReqBody struct + Body *string + type UpdateCommentResponse struct + Data components.GistComment + func UpdateComment(ctx context.Context, req *UpdateCommentReq, opt ...requests.Option) (*UpdateCommentResponse, error) + func (r *UpdateCommentResponse) HTTPResponse() *http.Response + func (r *UpdateCommentResponse) ReadResponse(resp *http.Response) error + type UpdateReq struct + GistId string + RequestBody UpdateReqBody + func (r *UpdateReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) + func (r *UpdateReq) Rel(link string, resp *UpdateResponse) bool + type UpdateReqBody struct + Description *string + Files map[string]UpdateReqBodyFiles + type UpdateReqBodyFiles struct + Content *string + Filename *string + type UpdateResponse struct + Data components.GistFull + func Update(ctx context.Context, req *UpdateReq, opt ...requests.Option) (*UpdateResponse, error) + func (r *UpdateResponse) HTTPResponse() *http.Response + func (r *UpdateResponse) ReadResponse(resp *http.Response) error