Documentation
¶
Index ¶
- func RegisterApp(input *RegisterAppInput) (*mastodon.Application, error)
- type AsyncFollowers
- type AsyncFollowing
- type AsyncGetAccountStatusesInput
- type AsyncGetFollowersInput
- type AsyncGetFollowingInput
- type AsyncGetNotificationsInput
- type AsyncNotices
- type AsyncStatuses
- type Config
- func (c *Config) AsyncGetAccountStatuses(input *AsyncGetAccountStatusesInput)
- func (c *Config) AsyncGetFollowers(input *AsyncGetFollowersInput)
- func (c *Config) AsyncGetFollowing(input *AsyncGetFollowingInput)
- func (c *Config) AsyncGetNotifications(input *AsyncGetNotificationsInput)
- func (c *Config) GetAuthTokenFromCode(authCode *string, redirectURI *string) (*string, error)
- func (c *Config) GetUserByID(id string) (*mastodon.Account, error)
- func (c *Config) Me() (*mastodon.Account, error)
- func (c *Config) Post(toot *mastodon.Toot) (*mastodon.ID, error)
- func (c *Config) SetAccessToken(accessToken string)
- func (c *Config) SetClientKey(clientKey string)
- func (c *Config) SetClientSecret(clientSecret string)
- func (c *Config) SetInstance(instance string)
- func (c *Config) SetLogger(log *zerolog.Logger)
- type NoAccessTokenError
- type NoClientKeyError
- type NoClientSecretError
- type NoInstanceError
- type Option
- type PostFailedError
- type RegisterAppInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterApp ¶
func RegisterApp(input *RegisterAppInput) (*mastodon.Application, error)
Types ¶
type AsyncFollowers ¶
type AsyncFollowers struct { Followers []*mastodon.Account Pagination *mastodon.Pagination Err error }
AsyncAccount is a struct for returning ollowers asynchronously
type AsyncFollowing ¶
type AsyncFollowing struct { Following []*mastodon.Account Pagination *mastodon.Pagination Err error }
AsyncAccount is a struct for returning followings asynchronously
type AsyncGetAccountStatusesInput ¶
type AsyncGetAccountStatusesInput struct { ID string SinceID *string Ch chan AsyncStatuses }
AsyncGetAccountStatusesInput is a struct for getting statuses asynchronously
type AsyncGetFollowersInput ¶
type AsyncGetFollowersInput struct { ID string SinceID *string Ch chan AsyncFollowers }
AsyncGetFollowersInput is a struct for getting followers asynchronously
type AsyncGetFollowingInput ¶
type AsyncGetFollowingInput struct { ID string SinceID *string Ch chan AsyncFollowing }
AsyncGetFollowingInput is a struct for getting followings asynchronously
type AsyncGetNotificationsInput ¶
type AsyncGetNotificationsInput struct { MaxID *string SinceID *string MinID *string Ch chan AsyncNotices }
AsyncGetNotificationsInput is a struct for getting notifications asynchronously
type AsyncNotices ¶
type AsyncNotices struct { Notices []*mastodon.Notification Err error }
AsyncAccount is a struct for returning notices asynchronously
type AsyncStatuses ¶
type AsyncStatuses struct { Statuses []*mastodon.Status Err error }
AsyncStatuses is a struct for returning statuses asynchronously
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config for the weather query
func (*Config) AsyncGetAccountStatuses ¶
func (c *Config) AsyncGetAccountStatuses(input *AsyncGetAccountStatusesInput)
AsyncGetAccountStatuses gets account statuses asynchronously
func (*Config) AsyncGetFollowers ¶
func (c *Config) AsyncGetFollowers(input *AsyncGetFollowersInput)
AsyncGetFollowers gets followers asynchronously
func (*Config) AsyncGetFollowing ¶
func (c *Config) AsyncGetFollowing(input *AsyncGetFollowingInput)
AsyncGetFollowing gets following asynchronously
func (*Config) AsyncGetNotifications ¶
func (c *Config) AsyncGetNotifications(input *AsyncGetNotificationsInput)
AsyncGetNotifications gets notifications asynchronously
func (*Config) GetAuthTokenFromCode ¶ added in v1.0.1
func (*Config) GetUserByID ¶
GetUserByID gets a user by ID
func (*Config) SetAccessToken ¶ added in v1.0.2
SetAccessToken sets the access token
func (*Config) SetClientKey ¶ added in v1.0.2
SetClientKey sets the client key
func (*Config) SetClientSecret ¶ added in v1.0.2
SetClientSecret sets the client secret
func (*Config) SetInstance ¶ added in v1.0.2
SetInstance sets the instance
type NoAccessTokenError ¶
NoAccessTokenError error
func (*NoAccessTokenError) Error ¶
func (e *NoAccessTokenError) Error() string
Error returns the error message
type NoClientKeyError ¶
NoClientKeyError error
func (*NoClientKeyError) Error ¶
func (e *NoClientKeyError) Error() string
Error returns the error message
type NoClientSecretError ¶
NoClientSecretError error
func (*NoClientSecretError) Error ¶
func (e *NoClientSecretError) Error() string
Error returns the error message
type NoInstanceError ¶
NoInstanceError error
func (*NoInstanceError) Error ¶
func (e *NoInstanceError) Error() string
Error returns the error message
type Option ¶
type Option func(c *Config)
Options for the weather query
func WithAccessToken ¶
WithToken sets the token to use
func WithClientSecret ¶
WithClientSecret sets the client secret to use
func WithClientkey ¶
WithClientID sets the client ID to use
type PostFailedError ¶
PostFailedError error
func (*PostFailedError) Error ¶
func (e *PostFailedError) Error() string
Error returns the error message