mastodon

package
v0.28.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(v *viper.Viper, cred bridge.Credentials, eventChan chan *bridge.Event, onConnect func()) (bridge.Bridger, error)

Types

type Mastodon

type Mastodon struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*Mastodon) AddReaction

func (m *Mastodon) AddReaction(msgID, emoji string) error

func (*Mastodon) Connected

func (m *Mastodon) Connected() bool

func (*Mastodon) GetChannel

func (m *Mastodon) GetChannel(channelID string) (*bridge.ChannelInfo, error)

func (*Mastodon) GetChannelID

func (m *Mastodon) GetChannelID(name, teamID string) string

func (*Mastodon) GetChannelName

func (m *Mastodon) GetChannelName(channelID string) string

func (*Mastodon) GetChannelUsers

func (m *Mastodon) GetChannelUsers(channelID string) ([]*bridge.UserInfo, error)

func (*Mastodon) GetChannels

func (m *Mastodon) GetChannels() []*bridge.ChannelInfo
func (m *Mastodon) GetFileLinks(fileIDs []string) []string

func (*Mastodon) GetLastSentMsgs added in v0.27.1

func (m *Mastodon) GetLastSentMsgs() []string

func (*Mastodon) GetLastViewedAt

func (m *Mastodon) GetLastViewedAt(channelID string) int64

func (*Mastodon) GetMe

func (m *Mastodon) GetMe() *bridge.UserInfo

func (*Mastodon) GetPostThread added in v0.28.0

func (m *Mastodon) GetPostThread(postID string) interface{}

func (*Mastodon) GetPosts

func (m *Mastodon) GetPosts(channelID string, limit int) interface{}

func (*Mastodon) GetPostsSince

func (m *Mastodon) GetPostsSince(channelID string, since int64) interface{}

func (*Mastodon) GetTeamName

func (m *Mastodon) GetTeamName(teamID string) string

func (*Mastodon) GetUser

func (m *Mastodon) GetUser(userID string) *bridge.UserInfo

func (*Mastodon) GetUserByUsername

func (m *Mastodon) GetUserByUsername(username string) *bridge.UserInfo

func (*Mastodon) GetUsers

func (m *Mastodon) GetUsers() []*bridge.UserInfo

func (*Mastodon) Invite

func (m *Mastodon) Invite(channelID, username string) error

func (*Mastodon) Join

func (m *Mastodon) Join(channelName string) (string, string, error)

func (*Mastodon) Kick

func (m *Mastodon) Kick(channelID, username string) error

func (*Mastodon) List

func (m *Mastodon) List() (map[string]string, error)

func (*Mastodon) Logout

func (m *Mastodon) Logout() error

func (*Mastodon) ModifyPost

func (m *Mastodon) ModifyPost(channelID, text string) error

func (*Mastodon) MsgChannel

func (m *Mastodon) MsgChannel(channelID, text string) (string, error)

func (*Mastodon) MsgChannelThread

func (m *Mastodon) MsgChannelThread(username, parentID, text string) (string, error)

func (*Mastodon) MsgUser

func (m *Mastodon) MsgUser(username, text string) (string, error)

func (*Mastodon) MsgUserThread

func (m *Mastodon) MsgUserThread(username, parentID, text string) (string, error)

func (*Mastodon) Nick

func (m *Mastodon) Nick(name string) error

func (*Mastodon) Part

func (m *Mastodon) Part(channelID string) error

func (*Mastodon) Protocol

func (m *Mastodon) Protocol() string

func (*Mastodon) RemoveReaction

func (m *Mastodon) RemoveReaction(msgID, emoji string) error

func (*Mastodon) SearchPosts

func (m *Mastodon) SearchPosts(search string) interface{}

func (*Mastodon) SearchUsers

func (m *Mastodon) SearchUsers(query string) ([]*bridge.UserInfo, error)

func (*Mastodon) SetStatus

func (m *Mastodon) SetStatus(status string) error

func (*Mastodon) SetTopic

func (m *Mastodon) SetTopic(channelID, text string) error

func (*Mastodon) StatusUser

func (m *Mastodon) StatusUser(name string) (string, error)

func (*Mastodon) StatusUsers

func (m *Mastodon) StatusUsers() (map[string]string, error)

func (*Mastodon) Topic

func (m *Mastodon) Topic(channelID string) string

func (*Mastodon) UpdateChannels

func (m *Mastodon) UpdateChannels() error

func (*Mastodon) UpdateLastViewed

func (m *Mastodon) UpdateLastViewed(channelID string)

func (*Mastodon) UpdateLastViewedUser

func (m *Mastodon) UpdateLastViewedUser(userID string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL