types

package
v0.11.4 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: MIT Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetByUsernameInput

type GetByUsernameInput struct {

	// Path parameters
	Username string // required

	// Query parameters
	Expansions  fields.ExpansionList
	TweetFields fields.TweetFieldList
	UserFields  fields.UserFieldList
	// contains filtered or unexported fields
}

GetByUsernameInput is struct for requesting `GET /2/users/by/username/:username`. more information: https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users-by-username-username

func (*GetByUsernameInput) AccessToken

func (p *GetByUsernameInput) AccessToken() string

func (*GetByUsernameInput) Body

func (p *GetByUsernameInput) Body() (io.Reader, error)

func (*GetByUsernameInput) ParameterMap

func (p *GetByUsernameInput) ParameterMap() map[string]string

func (*GetByUsernameInput) ResolveEndpoint

func (p *GetByUsernameInput) ResolveEndpoint(endpointBase string) string

func (*GetByUsernameInput) SetAccessToken

func (p *GetByUsernameInput) SetAccessToken(token string)

type GetByUsernameOutput

type GetByUsernameOutput struct {
	Data     resources.User `json:"data"`
	Includes struct {
		Tweets []resources.Tweet `json:"tweets"`
	} `json:"includes"`
	Errors []resources.PartialError `json:"errors"`
}

GetByUsernameOutput is struct for response of `GET /2/users/by/username/:username`. more information: https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users-by-username-username

func (*GetByUsernameOutput) HasPartialError

func (r *GetByUsernameOutput) HasPartialError() bool

type GetInput

type GetInput struct {

	// Path parameters
	ID string // required

	// Query parameters
	Expansions  fields.ExpansionList
	TweetFields fields.TweetFieldList
	UserFields  fields.UserFieldList
	// contains filtered or unexported fields
}

GetInput is struct for requesting `GET /2/users/:id`. more information: https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users-id

func (*GetInput) AccessToken

func (p *GetInput) AccessToken() string

func (*GetInput) Body

func (p *GetInput) Body() (io.Reader, error)

func (*GetInput) ParameterMap

func (p *GetInput) ParameterMap() map[string]string

func (*GetInput) ResolveEndpoint

func (p *GetInput) ResolveEndpoint(endpointBase string) string

func (*GetInput) SetAccessToken

func (p *GetInput) SetAccessToken(token string)

type GetMeInput

type GetMeInput struct {

	// Query parameters
	Expansions  fields.ExpansionList
	TweetFields fields.TweetFieldList
	UserFields  fields.UserFieldList
	// contains filtered or unexported fields
}

GetMeInput is struct for requesting `GET /2/users/me`. more information: https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users-me

func (*GetMeInput) AccessToken

func (p *GetMeInput) AccessToken() string

func (*GetMeInput) Body

func (p *GetMeInput) Body() (io.Reader, error)

func (*GetMeInput) ParameterMap

func (p *GetMeInput) ParameterMap() map[string]string

func (*GetMeInput) ResolveEndpoint

func (p *GetMeInput) ResolveEndpoint(endpointBase string) string

func (*GetMeInput) SetAccessToken

func (p *GetMeInput) SetAccessToken(token string)

type GetMeOutput

type GetMeOutput struct {
	Data     resources.User `json:"data"`
	Includes struct {
		Tweets []resources.Tweet `json:"tweets"`
	} `json:"includes"`
	Errors []resources.PartialError `json:"errors"`
}

GetMeOutput is struct for response of `GET /2/users/me`. more information: https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users-me

func (*GetMeOutput) HasPartialError

func (r *GetMeOutput) HasPartialError() bool

type GetOutput

type GetOutput struct {
	Data     resources.User `json:"data"`
	Includes struct {
		Tweets []resources.Tweet `json:"tweets"`
	} `json:"includes"`
	Errors []resources.PartialError `json:"errors"`
}

GetOutput is struct for response of `GET /2/users/:id`. more information: https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users-id

func (*GetOutput) HasPartialError

func (r *GetOutput) HasPartialError() bool

type ListByUsernamesInput

type ListByUsernamesInput struct {

	// Query parameters
	Usernames   []string // required
	Expansions  fields.ExpansionList
	TweetFields fields.TweetFieldList
	UserFields  fields.UserFieldList
	// contains filtered or unexported fields
}

ListByUsernamesInput is struct for requesting `GET /2/users/by`. more information: https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users-by

func (*ListByUsernamesInput) AccessToken

func (p *ListByUsernamesInput) AccessToken() string

func (*ListByUsernamesInput) Body

func (p *ListByUsernamesInput) Body() (io.Reader, error)

func (*ListByUsernamesInput) ParameterMap

func (p *ListByUsernamesInput) ParameterMap() map[string]string

func (*ListByUsernamesInput) ResolveEndpoint

func (p *ListByUsernamesInput) ResolveEndpoint(endpointBase string) string

func (*ListByUsernamesInput) SetAccessToken

func (p *ListByUsernamesInput) SetAccessToken(token string)

type ListByUsernamesOutput

type ListByUsernamesOutput struct {
	Data     []resources.User `json:"data"`
	Includes struct {
		Tweets []resources.Tweet `json:"tweets"`
	} `json:"includes"`
	Errors []resources.PartialError `json:"errors"`
}

ListByUsernamesOutput is struct for response of `GET /2/users/by`. more information: https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users-by

func (*ListByUsernamesOutput) HasPartialError

func (r *ListByUsernamesOutput) HasPartialError() bool

type ListInput

type ListInput struct {

	// Query parameters
	IDs         []string // required
	Expansions  fields.ExpansionList
	TweetFields fields.TweetFieldList
	UserFields  fields.UserFieldList
	// contains filtered or unexported fields
}

ListInput is struct for requesting `GET /2/users`. more information: https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users

func (*ListInput) AccessToken

func (p *ListInput) AccessToken() string

func (*ListInput) Body

func (p *ListInput) Body() (io.Reader, error)

func (*ListInput) ParameterMap

func (p *ListInput) ParameterMap() map[string]string

func (*ListInput) ResolveEndpoint

func (p *ListInput) ResolveEndpoint(endpointBase string) string

func (*ListInput) SetAccessToken

func (p *ListInput) SetAccessToken(token string)

type ListOutput

type ListOutput struct {
	Data     []resources.User `json:"data"`
	Includes struct {
		Tweets []resources.Tweet `json:"tweets"`
	} `json:"includes"`
	Errors []resources.PartialError `json:"errors"`
}

ListOutput is struct for response of `GET /2/users`. more information: https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users

func (*ListOutput) HasPartialError

func (r *ListOutput) HasPartialError() bool

Jump to

Keyboard shortcuts

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