Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
mastodon
✓ github.com/mattn/go-mastodon
Creates a Mastodon client and fetches the home timeline.
package main
import (
"fmt"
"github.com/mattn/go-mastodon"
)
func main() {
c := mastodon.NewClient(&mastodon.Config{
Server: "https://mastodon.social",
AccessToken: "your-access-token",
})
timeline, err := c.GetTimelineHome(context.Background(), nil)
if err != nil {
panic(err)
}
fmt.Println(timeline[0].Content)
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
0.0.11latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.