Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Account ¶
type Account struct { Id string `json:"id"` Username string `json:"username"` Acct string `json:"acct"` DisplayName string `json:"display_name"` Locked bool `json:"locked"` Bot bool `json:"bot"` Discoverable bool `json:"discoverable"` Group bool `json:"group"` CreatedAt time.Time `json:"created_at"` Note string `json:"note"` URL string `json:"url"` URI string `json:"uri"` Avatar string `json:"avatar"` AvatarStatic string `json:"avatar_static"` Header string `json:"header"` HeaderStatic string `json:"header_static"` FollowersCount int `json:"followers_count"` FollowingCount int `json:"following_count"` StatusesCount int `json:"statuses_count"` LastStatusAt string `json:"last_status_at"` }
type Application ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
func New(userURL string, filters PostsFilter, opts ClientOptions) (Client, error)
type ClientOptions ¶
type MediaAttachment ¶
type Post ¶
type Post struct { CreatedAt time.Time `json:"created_at"` Id string `json:"id"` Visibility string `json:"visibility"` InReplyToId string `json:"in_reply_to_id"` InReplyToAccountId string `json:"in_reply_to_account_id"` Sensitive bool `json:"sensitive"` SpoilerText string `json:"spoiler_text"` Language string `json:"language"` URI string `json:"uri"` URL string `json:"url"` Application Application `json:"application"` Content string `json:"content"` MediaAttachments []MediaAttachment `json:"media_attachments"` RepliesCount int `json:"replies_count"` ReblogsCount int `json:"reblogs_count"` FavoritesCount int `json:"favourites_count"` Pinned bool `json:"pinned"` Tags []Tag `json:"tags"` Favourited bool `json:"favourited"` Reblogged bool `json:"reblogged"` Muted bool `json:"muted"` Bookmarked bool `json:"bookmarked"` Account Account `json:"account"` // contains filtered or unexported fields }
func FetchPosts ¶
func FetchPosts(baseURL string, accountId string, filters PostsFilter) ([]Post, error)
func (Post) AllMedia ¶
func (p Post) AllMedia() []MediaAttachment
func (Post) Descendants ¶
func (Post) ShouldSkip ¶
type PostsFilter ¶
type StatusContext ¶
type StatusContext struct { Ancestors []Post `json:"ancestors"` Descendants []Post `json:"descendants"` }
func FetchStatusContext ¶
func FetchStatusContext(baseURL, postId string) (StatusContext, error)
Click to show internal directories.
Click to hide internal directories.