(ctx context.Context, feed Feed, opts ...FollowingOption)
| 633 | } |
| 634 | |
| 635 | func (c *Client) getFollowing(ctx context.Context, feed Feed, opts ...FollowingOption) (*FollowingResponse, error) { |
| 636 | endpoint := c.makeEndpoint("feed/%s/%s/follows/", feed.Slug(), feed.UserID()) |
| 637 | for _, opt := range opts { |
| 638 | endpoint.addQueryParam(opt) |
| 639 | } |
| 640 | |
| 641 | resp, err := c.get(ctx, endpoint, nil, c.authenticator.feedAuth(resFollower, feed)) |
| 642 | if err != nil { |
| 643 | return nil, err |
| 644 | } |
| 645 | var out FollowingResponse |
| 646 | if err := json.Unmarshal(resp, &out); err != nil { |
| 647 | return nil, err |
| 648 | } |
| 649 | return &out, nil |
| 650 | } |
| 651 | |
| 652 | func (c *Client) unfollow(ctx context.Context, feed Feed, target string, opts ...UnfollowOption) (*BaseResponse, error) { |
| 653 | endpoint := c.makeEndpoint("feed/%s/%s/follows/%s/", feed.Slug(), feed.UserID(), target) |
no test coverage detected