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

Method GetActivities

notification_feed.go:15–25  ·  view source on GitHub ↗

GetActivities returns the activities for the given NotificationFeed, filtering results with the provided GetActivitiesOption parameters.

(ctx context.Context, opts ...GetActivitiesOption)

Source from the content-addressed store, hash-verified

13// GetActivities returns the activities for the given NotificationFeed, filtering
14// results with the provided GetActivitiesOption parameters.
15func (f *NotificationFeed) GetActivities(ctx context.Context, opts ...GetActivitiesOption) (*NotificationFeedResponse, error) {
16 body, err := f.client.getActivities(ctx, f, opts...)
17 if err != nil {
18 return nil, err
19 }
20 var resp NotificationFeedResponse
21 if err := json.Unmarshal(body, &resp); err != nil {
22 return nil, err
23 }
24 return &resp, nil
25}
26
27// GetNextPageActivities returns the activities for the given NotificationFeed at the "next" page
28// of a previous *NotificationFeedResponse response, if any.

Callers 1

GetNextPageActivitiesMethod · 0.95

Calls 1

getActivitiesMethod · 0.80

Tested by

no test coverage detected