(ctx context.Context, feed Feed, opts ...FollowStatOption)
| 659 | } |
| 660 | |
| 661 | func (c *Client) followStats(ctx context.Context, feed Feed, opts ...FollowStatOption) (*FollowStatResponse, error) { |
| 662 | endpoint := c.makeEndpoint("stats/follow/") |
| 663 | endpoint.addQueryParam(makeRequestOption("followers", feed.ID())) |
| 664 | endpoint.addQueryParam(makeRequestOption("following", feed.ID())) |
| 665 | for _, opt := range opts { |
| 666 | endpoint.addQueryParam(opt) |
| 667 | } |
| 668 | |
| 669 | resp, err := c.get(ctx, endpoint, nil, c.authenticator.feedAuth(resFollower, nil)) |
| 670 | if err != nil { |
| 671 | return nil, err |
| 672 | } |
| 673 | var out FollowStatResponse |
| 674 | if err := json.Unmarshal(resp, &out); err != nil { |
| 675 | return nil, err |
| 676 | } |
| 677 | return &out, nil |
| 678 | } |
| 679 | |
| 680 | func (c *Client) updateToTargets(ctx context.Context, feed Feed, activity Activity, opts ...UpdateToTargetsOption) (*UpdateToTargetsResponse, error) { |
| 681 | if len(opts) == 0 { |
no test coverage detected