Versions in this module Expand all Collapse all v2 v2.4.0 Aug 3, 2019 Changes in this version + const MadonVersion + const NoRedirect + var ErrAlreadyRegistered = errors.New("app already registered") + var ErrEntityNotFound = errors.New("entity not found") + var ErrInvalidID = errors.New("incorrect entity ID") + var ErrInvalidParameter = errors.New("incorrect parameter") + var ErrUninitializedClient = errors.New("use of uninitialized madon client") + type Account struct + Acct string + Avatar string + AvatarStatic string + Bot bool + CreatedAt time.Time + DisplayName string + Emojis []Emoji + Fields *[]Field + FollowersCount int64 + FollowingCount int64 + Header string + HeaderStatic string + ID int64 + Locked bool + Moved *Account + Note string + Source *SourceParams + StatusesCount int64 + URL string + Username string + type Application struct + Name string + Website string + type Attachment struct + Description *string + ID int64 + Meta ... + PreviewURL string + RemoteURL *string + TextURL *string + Type string + URL string + type Card struct + AuthorName *string + AuthorURL *string + Description string + EmbedURL *string + HTML *string + Height *int + Image string + ProviderName *string + ProviderURL *string + Title string + Type *string + URL string + Width *int + type Client struct + APIBase string + ID string + InstanceURL string + Name string + Secret string + UserToken *UserToken + func NewApp(name, website string, scopes []string, redirectURI, instanceName string) (mc *Client, err error) + func RestoreApp(name, instanceName, appID, appSecret string, userToken *UserToken) (mc *Client, err error) + func (mc *Client) AddListAccounts(listID int64, accountIDs []int64) error + func (mc *Client) BlockAccount(accountID int64) (*Relationship, error) + func (mc *Client) BlockDomain(domain DomainName) error + func (mc *Client) ClearNotifications() error + func (mc *Client) CreateList(title string) (*List, error) + func (mc *Client) DeleteList(listID int64) error + func (mc *Client) DeleteStatus(statusID int64) error + func (mc *Client) DeleteSuggestion(accountID int64) error + func (mc *Client) DismissNotification(notificationID int64) error + func (mc *Client) FavouriteStatus(statusID int64) error + func (mc *Client) FollowAccount(accountID int64, reblogs *bool) (*Relationship, error) + func (mc *Client) FollowRemoteAccount(uri string) (*Account, error) + func (mc *Client) FollowRequestAuthorize(accountID int64, authorize bool) error + func (mc *Client) GetAccount(accountID int64) (*Account, error) + func (mc *Client) GetAccountFollowRequests(lopt *LimitParams) ([]Account, error) + func (mc *Client) GetAccountFollowers(accountID int64, lopt *LimitParams) ([]Account, error) + func (mc *Client) GetAccountFollowing(accountID int64, lopt *LimitParams) ([]Account, error) + func (mc *Client) GetAccountRelationships(accountIDs []int64) ([]Relationship, error) + func (mc *Client) GetAccountStatuses(accountID int64, onlyPinned, onlyMedia, excludeReplies bool, lopt *LimitParams) ([]Status, error) + func (mc *Client) GetBlockedAccounts(lopt *LimitParams) ([]Account, error) + func (mc *Client) GetBlockedDomains(lopt *LimitParams) ([]DomainName, error) + func (mc *Client) GetCurrentAccount() (*Account, error) + func (mc *Client) GetCurrentInstance() (*Instance, error) + func (mc *Client) GetCustomEmojis(lopt *LimitParams) ([]Emoji, error) + func (mc *Client) GetEndorsements(lopt *LimitParams) ([]Account, error) + func (mc *Client) GetFavourites(lopt *LimitParams) ([]Status, error) + func (mc *Client) GetInstanceActivity() ([]WeekActivity, error) + func (mc *Client) GetInstancePeers() ([]InstancePeer, error) + func (mc *Client) GetList(listID int64) (*List, error) + func (mc *Client) GetListAccounts(listID int64, lopt *LimitParams) ([]Account, error) + func (mc *Client) GetLists(accountID int64, lopt *LimitParams) ([]List, error) + func (mc *Client) GetMutedAccounts(lopt *LimitParams) ([]Account, error) + func (mc *Client) GetNotification(notificationID int64) (*Notification, error) + func (mc *Client) GetNotifications(excludeTypes []string, lopt *LimitParams) ([]Notification, error) + func (mc *Client) GetReports(lopt *LimitParams) ([]Report, error) + func (mc *Client) GetStatus(statusID int64) (*Status, error) + func (mc *Client) GetStatusCard(statusID int64) (*Card, error) + func (mc *Client) GetStatusContext(statusID int64) (*Context, error) + func (mc *Client) GetStatusFavouritedBy(statusID int64, lopt *LimitParams) ([]Account, error) + func (mc *Client) GetStatusRebloggedBy(statusID int64, lopt *LimitParams) ([]Account, error) + func (mc *Client) GetSuggestions(lopt *LimitParams) ([]Account, error) + func (mc *Client) GetTimelines(timeline string, local, onlyMedia bool, lopt *LimitParams) ([]Status, error) + func (mc *Client) LoginBasic(username, password string, scopes []string) error + func (mc *Client) LoginOAuth2(code string, scopes []string) (string, error) + func (mc *Client) MuteAccount(accountID int64, muteNotifications *bool) (*Relationship, error) + func (mc *Client) MuteConversation(statusID int64) (*Status, error) + func (mc *Client) PinAccount(accountID int64) (*Relationship, error) + func (mc *Client) PinStatus(statusID int64) error + func (mc *Client) PostStatus(cmdParams PostStatusParams) (*Status, error) + func (mc *Client) ReblogStatus(statusID int64) error + func (mc *Client) RemoveListAccounts(listID int64, accountIDs []int64) error + func (mc *Client) ReportUser(accountID int64, statusIDs []int64, comment string) (*Report, error) + func (mc *Client) Search(query string, resolve bool) (*Results, error) + func (mc *Client) SearchAccounts(query string, following bool, lopt *LimitParams) ([]Account, error) + func (mc *Client) SetUserToken(token, username, password string, scopes []string) error + func (mc *Client) StreamListener(name, hashTag string, events chan<- StreamEvent, stopCh <-chan bool, ...) error + func (mc *Client) UnblockAccount(accountID int64) (*Relationship, error) + func (mc *Client) UnblockDomain(domain DomainName) error + func (mc *Client) UnfavouriteStatus(statusID int64) error + func (mc *Client) UnfollowAccount(accountID int64) (*Relationship, error) + func (mc *Client) UnmuteAccount(accountID int64) (*Relationship, error) + func (mc *Client) UnmuteConversation(statusID int64) (*Status, error) + func (mc *Client) UnpinAccount(accountID int64) (*Relationship, error) + func (mc *Client) UnpinStatus(statusID int64) error + func (mc *Client) UnreblogStatus(statusID int64) error + func (mc *Client) UpdateAccount(cmdParams UpdateAccountParams) (*Account, error) + func (mc *Client) UpdateList(listID int64, title string) (*List, error) + func (mc *Client) UpdateMedia(mediaID int64, description, focus *string) (*Attachment, error) + func (mc *Client) UploadMedia(filePath, description, focus string) (*Attachment, error) + func (mc *Client) UploadMediaReader(f io.Reader, name, description, focus string) (*Attachment, error) + type Context struct + Ancestors []Status + Descendants []Status + type DomainName string + type Emoji struct + ShortCode string + StaticURL string + URL string + VisibleInPicker bool + type Error struct + Text string + type Field struct + Name string + Value string + type Instance struct + ContactAccount *Account + Description string + Email string + Languages []string + Stats struct{ ... } + Thumbnail *string + Title string + URI string + URLs struct{ ... } + Version string + type InstancePeer string + type LimitParams struct + All bool + Limit int + MaxID int64 + SinceID int64 + type List struct + ID int64 + Title string + type MastodonDate struct + func (act *MastodonDate) MarshalJSON() ([]byte, error) + func (act *MastodonDate) UnmarshalJSON(b []byte) error + type Mention struct + Acct string + ID int64 + URL string + Username string + type Notification struct + Account *Account + CreatedAt time.Time + ID int64 + Status *Status + Type string + type PostStatusParams struct + InReplyTo int64 + MediaIDs []int64 + Sensitive bool + SpoilerText string + Text string + Visibility string + type Relationship struct + Blocking bool + DomainBlocking bool + Endorsed bool + FollowedBy bool + Following bool + ID int64 + Muting bool + MutingNotifications bool + Requested bool + ShowingReblogs bool + type Report struct + ActionTaken string + ID int64 + type Results struct + Accounts []Account + Hashtags []Tag + Statuses []Status + type SourceParams struct + Fields *[]Field + Language *string + Note *string + Privacy *string + Sensitive *bool + type Status struct + Account *Account + Application *Application + Content string + CreatedAt time.Time + Emojis []Emoji + Favourited bool + FavouritesCount int64 + ID int64 + InReplyToAccountID *int64 + InReplyToID *int64 + Language *string + MediaAttachments []Attachment + Mentions []Mention + Muted bool + Pinned bool + Reblog *Status + Reblogged bool + ReblogsCount int64 + RepliesCount int64 + Sensitive bool + SpoilerText string + Tags []Tag + URI string + URL string + Visibility string + type StreamEvent struct + Data interface{} + Error error + Event string + type Tag struct + History []struct{ ... } + Name string + URL string + type UpdateAccountParams struct + AvatarImagePath *string + Bot *bool + DisplayName *string + FieldsAttributes *[]Field + HeaderImagePath *string + Locked *bool + Note *string + Source *SourceParams + type UserToken struct + AccessToken string + CreatedAt int64 + Scope string + TokenType string + type WeekActivity struct + Logins int64 + Registrations int64 + Statuses int64 + Week MastodonDate Other modules containing this package github.com/JedBeom/madon github.com/JedBeom/madon/v3