Cleanup
This commit is contained in:
@ -11,6 +11,7 @@ type Mastodon struct {
|
||||
client *mastodon.Client
|
||||
}
|
||||
|
||||
// NewMastodon initializes a new Mastodon client
|
||||
func NewMastodon(server string, clientID string, clientSecret string, username string, password string) *Mastodon {
|
||||
m := &Mastodon{}
|
||||
|
||||
|
@ -6,6 +6,7 @@ import (
|
||||
"github.com/mattn/go-mastodon"
|
||||
)
|
||||
|
||||
// Toot publishes a toot on Mastodon
|
||||
func (m *Mastodon) Toot(message string) error {
|
||||
_, err := m.client.PostStatus(context.Background(), &mastodon.Toot{
|
||||
Status: message,
|
||||
|
Reference in New Issue
Block a user