Adds TagUnfollow

This commit is contained in:
Paul Waldo 2023-05-28 15:16:54 -04:00
parent 5aff7298c3
commit 4836b8899c
No known key found for this signature in database
GPG key ID: 7CD5C6BB0D0BB7F4
5 changed files with 97 additions and 4 deletions

17
tags.go Normal file
View 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
}