Adds TagUnfollow
This commit is contained in:
parent
5aff7298c3
commit
4836b8899c
5 changed files with 97 additions and 4 deletions
17
tags.go
Normal file
17
tags.go
Normal file
|
@ -0,0 +1,17 @@
|
|||
package mastodon
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// TagUnfollow unfollows a hashtag.
|
||||
func (c *Client) TagUnfollow(ctx context.Context, ID string) (*FollowedTag, error) {
|
||||
var tag FollowedTag
|
||||
err := c.doAPI(ctx, http.MethodPost, fmt.Sprintf("/api/v1/tags/%s/unfollow", ID), nil, &tag, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &tag, nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue