Documentation
¶
Index ¶
- func ClearNotifications(instanceURL, accessToken string) error
- func GetMedia(mediaURL string, accessToken string) (string, error)
- func PostMedia(content string, files []string, reply Status, instanceURL, accessToken string) error
- func PostStatus(contents string, mediaIDs []string, reply Status, ...) error
- type Account
- type Attachment
- type Notification
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearNotifications ¶
ClearNotifications - Clear all notifications
Types ¶
type Account ¶
type Account struct { ID string `json:"id"` Username string `json:"username"` URL string `json:"url"` Acct string `json:"acct"` Avatar string `json:"avatar"` }
Account - Mastodon account object
func GetCurrentUser ¶
GetCurrentUser - Return the current user's user object
type Attachment ¶
type Attachment struct { ID string `json:"id"` MediaType string `json:"type"` URL string `json:"url"` RemoteURL string `json:"remote_url"` }
Attachment - Mastodon attachment object
type Notification ¶
type Notification struct { ID string `json:"id"` Type string `json:"type"` Account Account `json:"account"` Status Status `json:"status"` }
Notification - Mastodon notification object
func GetMentions ¶
func GetMentions(instanceURL, accessToken string) ([]Notification, error)
GetMentions - Get the bots mention notifications
type Status ¶
type Status struct { ID string `json:"id"` ReplyToID string `json:"in_reply_to_id"` Content string `json:"content"` Text string `json:"text"` MediaAttachments []Attachment `json:"media_attachments"` Account Account `json:"account"` Sensitive bool `json:"sensitive"` Visibility string `json:"visibility"` Mentions []Account `json:"mentions"` }
Status - Mastodon status object
Click to show internal directories.
Click to hide internal directories.