Documentation ¶
Index ¶
- type Client
- func (c Client) Get(ctx context.Context, req *GetReq, opt ...requests.Option) (*GetResponse, error)
- func (c Client) GetOctocat(ctx context.Context, req *GetOctocatReq, opt ...requests.Option) (*GetOctocatResponse, error)
- func (c Client) GetZen(ctx context.Context, req *GetZenReq, opt ...requests.Option) (*GetZenResponse, error)
- func (c Client) Root(ctx context.Context, req *RootReq, opt ...requests.Option) (*RootResponse, error)
- type GetOctocatReq
- type GetOctocatResponse
- type GetReq
- type GetResponse
- type GetZenReq
- type GetZenResponse
- type RootReq
- type RootResponse
- type RootResponseBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is a set of options to apply to requests
func (Client) Get ¶
Get performs requests for "meta/get"
Get GitHub meta information.
GET /meta
https://developer.github.com/v3/meta/#get-github-meta-information
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) GetOctocat ¶
func (c Client) GetOctocat(ctx context.Context, req *GetOctocatReq, opt ...requests.Option) (*GetOctocatResponse, error)
GetOctocat performs requests for "meta/get-octocat"
Get Octocat.
GET /octocat
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
type GetOctocatReq ¶
type GetOctocatReq struct { // The words to show in Octocat's speech bubble S *string // contains filtered or unexported fields }
GetOctocatReq is request data for Client.GetOctocat
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*GetOctocatReq) HTTPRequest ¶
func (r *GetOctocatReq) 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 (*GetOctocatReq) Rel ¶
func (r *GetOctocatReq) Rel(link string, resp *GetOctocatResponse) 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 GetOctocatResponse ¶
type GetOctocatResponse struct {
// contains filtered or unexported fields
}
GetOctocatResponse is a response for GetOctocat
func GetOctocat ¶
func GetOctocat(ctx context.Context, req *GetOctocatReq, opt ...requests.Option) (*GetOctocatResponse, error)
GetOctocat performs requests for "meta/get-octocat"
Get Octocat.
GET /octocat
func (*GetOctocatResponse) HTTPResponse ¶
func (r *GetOctocatResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*GetOctocatResponse) ReadResponse ¶
func (r *GetOctocatResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type GetReq ¶
type GetReq struct {
// contains filtered or unexported fields
}
GetReq is request data for Client.Get
https://developer.github.com/v3/meta/#get-github-meta-information
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.ApiOverview // contains filtered or unexported fields }
GetResponse is a response for Get
https://developer.github.com/v3/meta/#get-github-meta-information
func Get ¶
Get performs requests for "meta/get"
Get GitHub meta information.
GET /meta
https://developer.github.com/v3/meta/#get-github-meta-information
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 GetZenReq ¶
type GetZenReq struct {
// contains filtered or unexported fields
}
GetZenReq is request data for Client.GetZen
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*GetZenReq) HTTPRequest ¶
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
type GetZenResponse ¶
type GetZenResponse struct {
// contains filtered or unexported fields
}
GetZenResponse is a response for GetZen
func (*GetZenResponse) HTTPResponse ¶
func (r *GetZenResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*GetZenResponse) ReadResponse ¶
func (r *GetZenResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type RootReq ¶
type RootReq struct {
// contains filtered or unexported fields
}
RootReq is request data for Client.Root
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*RootReq) HTTPRequest ¶
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
type RootResponse ¶
type RootResponse struct { Data RootResponseBody // contains filtered or unexported fields }
RootResponse is a response for Root
func (*RootResponse) HTTPResponse ¶
func (r *RootResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*RootResponse) ReadResponse ¶
func (r *RootResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type RootResponseBody ¶
type RootResponseBody struct { AuthorizationsUrl string `json:"authorizations_url"` CodeSearchUrl string `json:"code_search_url"` CommitSearchUrl string `json:"commit_search_url"` CurrentUserAuthorizationsHtmlUrl string `json:"current_user_authorizations_html_url"` CurrentUserRepositoriesUrl string `json:"current_user_repositories_url"` CurrentUserUrl string `json:"current_user_url"` EmailsUrl string `json:"emails_url"` EmojisUrl string `json:"emojis_url"` EventsUrl string `json:"events_url"` FeedsUrl string `json:"feeds_url"` FollowersUrl string `json:"followers_url"` FollowingUrl string `json:"following_url"` GistsUrl string `json:"gists_url"` HubUrl string `json:"hub_url"` IssueSearchUrl string `json:"issue_search_url"` IssuesUrl string `json:"issues_url"` KeysUrl string `json:"keys_url"` LabelSearchUrl string `json:"label_search_url"` NotificationsUrl string `json:"notifications_url"` OrganizationRepositoriesUrl string `json:"organization_repositories_url"` OrganizationTeamsUrl string `json:"organization_teams_url"` OrganizationUrl string `json:"organization_url"` PublicGistsUrl string `json:"public_gists_url"` RateLimitUrl string `json:"rate_limit_url"` RepositorySearchUrl string `json:"repository_search_url"` RepositoryUrl string `json:"repository_url"` StarredGistsUrl string `json:"starred_gists_url"` StarredUrl string `json:"starred_url"` TopicSearchUrl string `json:"topic_search_url,omitempty"` UserOrganizationsUrl string `json:"user_organizations_url"` UserRepositoriesUrl string `json:"user_repositories_url"` UserSearchUrl string `json:"user_search_url"` UserUrl string `json:"user_url"` }
RootResponseBody is a response body for Root