2017-04-13 09:48:45 +02:00
|
|
|
# go-mastodon
|
|
|
|
|
2017-04-14 10:15:42 +02:00
|
|
|
[![Build Status](https://travis-ci.org/mattn/go-mastodon.png?branch=master)](https://travis-ci.org/mattn/go-mastodon)
|
2017-04-14 10:50:12 +02:00
|
|
|
[![Coverage Status](https://coveralls.io/repos/github/mattn/go-mastodon/badge.svg?branch=master)](https://coveralls.io/github/mattn/go-mastodon?branch=master)
|
2017-04-14 10:15:42 +02:00
|
|
|
[![GoDoc](https://godoc.org/github.com/mattn/go-mastodon?status.svg)](http://godoc.org/github.com/mattn/go-mastodon)
|
|
|
|
[![Go Report Card](https://goreportcard.com/badge/github.com/mattn/go-mastodon)](https://goreportcard.com/report/github.com/mattn/go-mastodon)
|
2017-04-13 09:48:45 +02:00
|
|
|
|
|
|
|
## 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)
|
|
|
|
}
|
|
|
|
```
|
2017-04-14 17:37:27 +02:00
|
|
|
## Status of implementations
|
|
|
|
|
|
|
|
* [x] GET /api/v1/accounts/:id
|
|
|
|
* [x] GET /api/v1/accounts/verify_credentials
|
|
|
|
* [x] GET /api/v1/accounts/:id/followers
|
|
|
|
* [x] GET /api/v1/accounts/:id/following
|
|
|
|
* [ ] GET /api/v1/accounts/:id/statuses
|
|
|
|
* [x] POST /api/v1/accounts/:id/follow
|
|
|
|
* [x] POST /api/v1/accounts/:id/unfollow
|
|
|
|
* [x] GET /api/v1/accounts/:id/block
|
|
|
|
* [x] GET /api/v1/accounts/:id/unblock
|
|
|
|
* [x] GET /api/v1/accounts/:id/mute
|
|
|
|
* [x] GET /api/v1/accounts/:id/unmute
|
|
|
|
* [x] GET /api/v1/accounts/relationships
|
|
|
|
* [x] GET /api/v1/accounts/search
|
|
|
|
* [x] POST /api/v1/apps
|
|
|
|
* [ ] GET /api/v1/blocks
|
|
|
|
* [ ] GET /api/v1/favourites
|
|
|
|
* [ ] GET /api/v1/follow_requests
|
|
|
|
* [ ] POST /api/v1/follow_requests/authorize
|
|
|
|
* [ ] POST /api/v1/follow_requests/reject
|
|
|
|
* [x] POST /api/v1/follows
|
|
|
|
* [x] GET /api/v1/instance
|
|
|
|
* [ ] POST /api/v1/media
|
|
|
|
* [ ] GET /api/v1/mutes
|
|
|
|
* [x] GET /api/v1/notifications
|
|
|
|
* [x] GET /api/v1/notifications/:id
|
|
|
|
* [x] POST /api/v1/notifications/clear
|
2017-04-16 21:51:16 +02:00
|
|
|
* [x] GET /api/v1/reports
|
|
|
|
* [x] POST /api/v1/reports
|
2017-04-14 17:37:27 +02:00
|
|
|
* [ ] GET /api/v1/search
|
|
|
|
* [x] GET /api/v1/statuses/:id
|
|
|
|
* [x] GET /api/v1/statuses/:id/context
|
|
|
|
* [x] GET /api/v1/statuses/:id/card
|
|
|
|
* [ ] GET /api/v1/statuses/:id/reblogged_by
|
|
|
|
* [ ] GET /api/v1/statuses/:id/favourited_by
|
|
|
|
* [ ] POST /api/v1/statuses
|
|
|
|
* [ ] DELETE /api/v1/statuses/:id
|
|
|
|
* [ ] POST /api/v1/statuses/:id/reblog
|
|
|
|
* [ ] POST /api/v1/statuses/:id/unreblog
|
|
|
|
* [ ] POST /api/v1/statuses/:id/favourite
|
|
|
|
* [ ] POST /api/v1/statuses/:id/unfavourite
|
|
|
|
* [x] GET /api/v1/timelines/home
|
|
|
|
* [ ] GET /api/v1/timelines/public
|
|
|
|
* [ ] GET /api/v1/timelines/tag/:hashtag
|
2017-04-13 09:48:45 +02:00
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
|
|
```
|
|
|
|
$ go get github.com/mattn/go-mastodon
|
|
|
|
```
|
|
|
|
|
|
|
|
## License
|
|
|
|
|
|
|
|
MIT
|
|
|
|
|
|
|
|
## Author
|
|
|
|
|
|
|
|
Yasuhiro Matsumoto (a.k.a. mattn)
|