go-mastodon/tags.go

18 lines
359 B
Go
Raw Normal View History

2023-05-28 21:16:54 +02:00
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
}