add DeleteToot

pull/13/head
Yasuhiro Matsumoto 2017-04-15 21:07:11 +09:00
parent 7ced22d42e
commit 82f7536210
2 changed files with 6 additions and 1 deletions

View File

@ -59,7 +59,7 @@ if err != nil {
* [ ] GET /api/v1/statuses/:id/reblogged_by * [ ] GET /api/v1/statuses/:id/reblogged_by
* [ ] GET /api/v1/statuses/:id/favourited_by * [ ] GET /api/v1/statuses/:id/favourited_by
* [ ] POST /api/v1/statuses * [ ] POST /api/v1/statuses
* [ ] DELETE /api/v1/statuses/:id * [x] DELETE /api/v1/statuses/:id
* [ ] POST /api/v1/statuses/:id/reblog * [ ] POST /api/v1/statuses/:id/reblog
* [ ] POST /api/v1/statuses/:id/unreblog * [ ] POST /api/v1/statuses/:id/unreblog
* [ ] POST /api/v1/statuses/:id/favourite * [ ] POST /api/v1/statuses/:id/favourite

View File

@ -122,3 +122,8 @@ func (c *Client) PostStatus(toot *Toot) (*Status, error) {
} }
return &status, nil return &status, nil
} }
// DeleteStatus delete the toot.
func (c *Client) DeleteStatus(id int64) error {
return c.doAPI(http.MethodDelete, fmt.Sprintf("/api/v1/statuses/%d", id), nil, nil)
}