Documentation
¶
Index ¶
- Variables
- func GetUserID(username string) (string, error)
- type Attachments
- type Entities
- type EntityHashtag
- type EntityMention
- type EntityURL
- type Media
- type ReferencedTweet
- type TextEntity
- type Tweet
- func FetchTweet(id string, config common.RequestConfig) (Tweet, error)
- func FetchTweets(ids []string, config common.RequestConfig) ([]Tweet, error)
- func FetchUserTimeline(userID string, config common.RequestConfig, sinceID string) ([]Tweet, error)
- func Search(query string, config common.RequestConfig, sinceID string) ([]Tweet, error)
- type TweetIncludes
- type TweetNoIncludes
- type TwitterUser
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrThrottled = fmt.Errorf("throttled")
Functions ¶
Types ¶
type Attachments ¶
type Attachments struct {
MediaKeys []string `json:"media_keys,omitempty"`
}
type Entities ¶
type Entities struct { URLs []EntityURL `json:"urls,omitempty"` Mentions []EntityMention `json:"mentions,omitempty"` }
type EntityHashtag ¶
type EntityHashtag struct { TextEntity Tag string `json:"tag,omitempty"` }
type EntityMention ¶
type EntityMention struct { TextEntity Username string `json:"username,omitempty"` }
type Media ¶
type Media struct { Type string `json:"type"` Key string `json:"media_key"` URL string `json:"url,omitempty"` PreviewURL string `json:"preview_image_url,omitempty"` Variants []map[string]interface{} `json:"variants,omitempty"` AltText string `json:"alt_text,omitempty"` }
func (Media) DisplayURLAndFilename ¶
func (Media) TargetURLAndFilename ¶
type ReferencedTweet ¶
type TextEntity ¶
type Tweet ¶
type Tweet struct { TweetNoIncludes Includes TweetIncludes `json:"includes,omitempty"` RequestConfig common.RequestConfig `json:",omitempty"` }
func FetchTweet ¶
func FetchTweet(id string, config common.RequestConfig) (Tweet, error)
func FetchTweets ¶
func FetchTweets(ids []string, config common.RequestConfig) ([]Tweet, error)
func FetchUserTimeline ¶
FetchUserTimeline fetches all tweets written by a user after tweet sinceID. Returns valid []Tweet even along with an error.
func (*Tweet) CopyIncludes ¶
func (t *Tweet) CopyIncludes(incl TweetIncludes)
type TweetIncludes ¶
type TweetIncludes struct { Users []TwitterUser `json:"users,omitempty"` Media []Media `json:"media,omitempty"` Tweets []TweetNoIncludes `json:"tweets,omitempty"` }
type TweetNoIncludes ¶
type TweetNoIncludes struct { ID string `json:"id"` Text string `json:"text"` ConversationID string `json:"conversation_id"` AuthorID string `json:"author_id"` ReferencedTweets []ReferencedTweet `json:"referenced_tweets,omitempty"` Entities Entities `json:"entities,omitempty"` Attachments Attachments `json:"attachments,omitempty"` CreatedAt string `json:"created_at,omitempty"` InReplyToUserID string `json:"in_reply_to_user_id,omitempty"` }
type TwitterUser ¶
Click to show internal directories.
Click to hide internal directories.