Documentation ¶
Overview ¶
Package mastodon is a Mastodon account for Telephant.
Index ¶
- type Account
- func (mod *Account) Authenticate(code, redirectURI string) (string, string, string, string, error)
- func (mod *Account) DeletePost(id string) error
- func (mod *Account) Follow(id string) error
- func (mod *Account) Like(id string) error
- func (mod *Account) List(id string, ch chan interface{}) error
- func (mod *Account) LoadAccount(id string) (accounts.ProfileEvent, []accounts.MessageEvent, error)
- func (mod *Account) LoadConversation(id string) ([]accounts.MessageEvent, error)
- func (mod *Account) Logo() string
- func (mod *Account) Panes() []accounts.Pane
- func (mod *Account) Post(message string, visibility string, attachments []string) error
- func (mod *Account) PostLimitCount(body string) int
- func (mod *Account) PublicTimeline(local bool, ch chan interface{}) error
- func (mod *Account) Reply(replyid string, message string, visibility string, attachments []string) error
- func (mod *Account) Run(eventChan chan interface{}) error
- func (mod *Account) Search(token string, ch chan interface{}) error
- func (mod *Account) Share(id string) error
- func (mod *Account) Tag(token string, ch chan interface{}) error
- func (mod *Account) Unfollow(id string) error
- func (mod *Account) Unlike(id string) error
- func (mod *Account) Unshare(id string) error
- func (mod *Account) UploadAttachment(url string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { SigChan chan bool // contains filtered or unexported fields }
Account is a Mastodon account for Telephant.
func NewAccount ¶
NewAccount returns a new Mastodon account.
func RegisterAccount ¶
RegisterAccount registers the app with an instance and retrieves an authentication URI.
func (*Account) Authenticate ¶
Authenticate finishes the authentication and retrieves an accesstoken from the instance, which we'll use for future logins.
func (*Account) DeletePost ¶
DeletePost deletes a post
func (*Account) LoadAccount ¶
func (mod *Account) LoadAccount(id string) (accounts.ProfileEvent, []accounts.MessageEvent, error)
LoadAccount loads a profile's information.
func (*Account) LoadConversation ¶
func (mod *Account) LoadConversation(id string) ([]accounts.MessageEvent, error)
LoadConversation loads a message conversation
func (*Account) PostLimitCount ¶
func (*Account) PublicTimeline ¶
PublicTimeline starts a stream for public timelines
func (*Account) Reply ¶
func (mod *Account) Reply(replyid string, message string, visibility string, attachments []string) error
Reply posts a new reply-status
func (*Account) UploadAttachment ¶
UploadAttachment uploads an attachment to Mastodon
Click to show internal directories.
Click to hide internal directories.