From 82f7536210932d6f61e655eeaccba620f27952ba Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Sat, 15 Apr 2017 21:07:11 +0900 Subject: [PATCH] add DeleteToot --- README.md | 2 +- status.go | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 21dca9a..70a2d86 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ if err != nil { * [ ] GET /api/v1/statuses/:id/reblogged_by * [ ] GET /api/v1/statuses/:id/favourited_by * [ ] 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/unreblog * [ ] POST /api/v1/statuses/:id/favourite diff --git a/status.go b/status.go index a4235c6..53cbd14 100644 --- a/status.go +++ b/status.go @@ -122,3 +122,8 @@ func (c *Client) PostStatus(toot *Toot) (*Status, error) { } 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) +}