MCPcopy Create free account
hub / github.com/GetStream/stream-go2 / Follow

Method Follow

feed.go:96–105  ·  view source on GitHub ↗

Follow follows the provided feed (which must be a FlatFeed), applying the provided FollowFeedOptions, if any.

(ctx context.Context, feed *FlatFeed, opts ...FollowFeedOption)

Source from the content-addressed store, hash-verified

94// Follow follows the provided feed (which must be a FlatFeed), applying the provided FollowFeedOptions,
95// if any.
96func (f *feed) Follow(ctx context.Context, feed *FlatFeed, opts ...FollowFeedOption) (*BaseResponse, error) {
97 followOptions := &followFeedOptions{
98 Target: fmt.Sprintf("%s:%s", feed.Slug(), feed.UserID()),
99 ActivityCopyLimit: defaultActivityCopyLimit,
100 }
101 for _, opt := range opts {
102 opt(followOptions)
103 }
104 return f.client.follow(ctx, f, followOptions)
105}
106
107// GetFollowing returns the list of the feeds following the feed, applying the provided FollowingOptions,
108// if any.

Callers

nothing calls this directly

Calls 3

followMethod · 0.80
SlugMethod · 0.65
UserIDMethod · 0.65

Tested by

no test coverage detected