Documentation ¶
Overview ¶
Package birds generates HTML out of twitter threads.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Entities ¶
type Entities struct { URLs []URLEntity `json:"urls,omitempty"` Mentions []MentionEntity `json:"mentions,omitempty"` }
Entities represent twitter entities of a single tweet.
type Includes ¶
type Includes struct { Tweets []*Tweet `json:"tweets"` Users []*User `json:"users"` Media []*Media `json:"media,omitempty"` }
Includes represends the included tweets, users, media.
type Media ¶
type Media struct { Key string `json:"media_key"` Width int `json:"width"` Height int `json:"height"` Type string `json:"type"` URL string `json:"url"` }
Media represents a twitter media (e.g. photo)
type MentionEntity ¶
type MentionEntity struct { Start int `json:"start"` End int `json:"end"` Username string `json:"username"` }
MentionEntity represents a mention in tweet's entities.
type Meta ¶
type Meta struct {
NextToken string `json:"next_token,omitempty"`
}
Meta represents the metadata portion of a twitter api response.
type Session ¶
Session manages a twitter application-only authentication sesison.
type Tweet ¶
type Tweet struct { Text string `json:"text"` ID json.Number `json:"id"` AuthorID json.Number `json:"author_id"` CreatedAt string `json:"created_at"` ConversationID json.Number `json:"conversation_id,omitempty"` InReplyToUserID json.Number `json:"in_reply_to_user_id,omitempty"` Entities Entities `json:"entities,omitempty"` Attachments struct { MediaKeys []string `json:"media_keys,omitempty"` } `json:"attachments,omitempty"` ReferencedTweets []struct { Type string `json:"type"` ID json.Number `json:"id"` } `json:"referenced_tweets,omitempty"` }
Tweet represents a single tweet.
func (*Tweet) RenderHTML ¶
RenderHTML renders the tweet text into HTML.
type URLEntity ¶
type URLEntity struct { Start int `json:"start"` End int `json:"end"` ExpandedURL string `json:"expanded_url"` }
URLEntity represents an url in tweet's entities.
Click to show internal directories.
Click to hide internal directories.