meta

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client []requests.Option

Client is a set of options to apply to requests

func NewClient

func NewClient(opt ...requests.Option) Client

NewClient returns a new Client

func (Client) Get

func (c Client) Get(ctx context.Context, req *GetReq, opt ...requests.Option) (*GetResponse, error)

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.

func (Client) GetZen

func (c Client) GetZen(ctx context.Context, req *GetZenReq, opt ...requests.Option) (*GetZenResponse, error)

GetZen performs requests for "meta/get-zen"

Get the Zen of GitHub.

GET /zen

Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.

func (Client) Root

func (c Client) Root(ctx context.Context, req *RootReq, opt ...requests.Option) (*RootResponse, error)

Root performs requests for "meta/root"

GitHub API Root.

GET /

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

func (r *GetReq) 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 (*GetReq) Rel

func (r *GetReq) Rel(link string, resp *GetResponse) 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 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

func Get(ctx context.Context, req *GetReq, opt ...requests.Option) (*GetResponse, error)

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

func (r *GetZenReq) 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 (*GetZenReq) Rel

func (r *GetZenReq) Rel(link string, resp *GetZenResponse) 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 GetZenResponse

type GetZenResponse struct {
	// contains filtered or unexported fields
}

GetZenResponse is a response for GetZen

func GetZen

func GetZen(ctx context.Context, req *GetZenReq, opt ...requests.Option) (*GetZenResponse, error)

GetZen performs requests for "meta/get-zen"

Get the Zen of GitHub.

GET /zen

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

func (r *RootReq) 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 (*RootReq) Rel

func (r *RootReq) Rel(link string, resp *RootResponse) 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 RootResponse

type RootResponse struct {
	Data RootResponseBody
	// contains filtered or unexported fields
}

RootResponse is a response for Root

func Root

func Root(ctx context.Context, req *RootReq, opt ...requests.Option) (*RootResponse, error)

Root performs requests for "meta/root"

GitHub API Root.

GET /

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL