39 lines
1021 B
Markdown
39 lines
1021 B
Markdown
# go-mastodon
|
|
|
|
[](https://travis-ci.org/mattn/go-mastodon)
|
|
[](https://coveralls.io/github/mattn/go-mastodon?branch=master)
|
|
[](http://godoc.org/github.com/mattn/go-mastodon)
|
|
[](https://goreportcard.com/report/github.com/mattn/go-mastodon)
|
|
|
|
## Usage
|
|
|
|
```go
|
|
c := mastodon.NewClient(&mastodon.Config{
|
|
Server: "https://mstdn.jp",
|
|
ClientID: "client-id",
|
|
ClientSecret: "client-secret",
|
|
})
|
|
err := c.Authenticate("your-username", "your-password")
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
timeline, err := c.GetTimeline("/api/v1/timelines/home")
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
```
|
|
|
|
## Installation
|
|
|
|
```
|
|
$ go get github.com/mattn/go-mastodon
|
|
```
|
|
|
|
## License
|
|
|
|
MIT
|
|
|
|
## Author
|
|
|
|
Yasuhiro Matsumoto (a.k.a. mattn)
|