types

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetInput

type GetInput struct {
	// Path parameter
	ID string

	// Query parameters
	Expansions  fields.ExpansionList
	MediaFields fields.MediaFieldList
	PlaceFields fields.PlaceFieldList
	PollFields  fields.PollFieldList
	TweetFields fields.TweetFieldList
	UserFields  fields.UserFieldList
}

func (*GetInput) Body

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

func (*GetInput) ContentType

func (p *GetInput) ContentType() string

func (*GetInput) ParameterMap

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

func (*GetInput) ResolveEndpoint

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

type GetOutput

type GetOutput struct {
	Data     resources.Tweet `json:"data"`
	Includes struct {
		Users  []resources.User  `json:"users,omitempty"`
		Tweets []resources.Tweet `json:"tweets,omitempty"`
		Places []resources.Place `json:"places,omitempty"`
		Media  []resources.Media `json:"media,omitempty"`
		Polls  []resources.Poll  `json:"polls,omitempty"`
	} `json:"includes"`
	Errors []resources.PartialError `json:"errors"`
}

func (*GetOutput) HasPartialError

func (r *GetOutput) HasPartialError() bool

type ListInput

type ListInput struct {
	// Query parameters
	IDs         []string
	Expansions  fields.ExpansionList
	MediaFields fields.MediaFieldList
	PlaceFields fields.PlaceFieldList
	PollFields  fields.PollFieldList
	TweetFields fields.TweetFieldList
	UserFields  fields.UserFieldList
}

func (*ListInput) Body

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

func (*ListInput) ContentType

func (p *ListInput) ContentType() string

func (*ListInput) ParameterMap

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

func (*ListInput) ResolveEndpoint

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

type ListOutput

type ListOutput struct {
	Data     []resources.Tweet `json:"data"`
	Includes struct {
		Users  []resources.User  `json:"users,omitempty"`
		Tweets []resources.Tweet `json:"tweets,omitempty"`
		Places []resources.Place `json:"places,omitempty"`
		Media  []resources.Media `json:"media,omitempty"`
		Polls  []resources.Poll  `json:"polls,omitempty"`
	} `json:"includes"`
	Errors []resources.PartialError `json:"errors"`
}

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