twitter

package
v0.0.0-...-d078efc Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2020 License: MIT Imports: 2 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 interface {
	Search(ctx context.Context, input *SearchInput) ([]Tweet, error)
}

Client provides twitter actions.

type Entities

type Entities struct {
	HashTags []HashTag
	Mentions []Mention
	URLs     []URL
	Media    []Medium
}

Entities represents Twitter Entities.

type HashTag

type HashTag struct {
	Start int
	End   int
	Tag   string
}

HashTag represents Twitter HashTag.

type Medium

type Medium struct {
	Start     int
	End       int
	URL       string
	MediaURL  string
	Type      string
	VideoInfo *VideoInfo
}

Medium represents Twitter Medium.

type Mention

type Mention struct {
	Start int
	End   int
	Tag   string
}

Mention represents Twitter Mention.

type SearchInput

type SearchInput struct {
	Query                    string
	TwitterAccessToken       string
	TwitterAccessTokenSecret string
	SinceID                  int64
	MaxID                    int64
}

SearchInput is the input for Search method.

type Tweet

type Tweet struct {
	TweetID   int64
	AuthorID  int64
	User      *User
	Text      string
	Entities  Entities
	CreatedAt time.Time
}

Tweet represents Twitter Tweet.

type URL

type URL struct {
	Start       int
	End         int
	URL         string
	ExpandedURL string
	DisplayURL  string
}

URL represents Twitter URL.

type User

type User struct {
	ID              int64 `json:",string"`
	Name            string
	ScreenName      string
	ProfileImageURL string
}

User represents Twitter user object.

type VideoInfo

type VideoInfo struct {
	AspectRatio    [2]int
	DurationMillis int
	Variants       []VideoVariant
}

VideoInfo is available on video media objects.

type VideoVariant

type VideoVariant struct {
	ContentType string
	Bitrate     int
	URL         string
}

VideoVariant describes one of the available video formats.

Jump to

Keyboard shortcuts

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