Activity Feeds V3 is in closed alpha — do not use it in production (just yet).

Feed views

When to use feed views

Feed groups let you define what activities should be included in the feed and the ranking to sort these activities.

By default all feeds in the given group will have the same settings. However, you might want to experiment with different selectors and rankings. Feed views let you do that by overriding the group’s default settings.

var createResponse = await _feedsV3Client.CreateFeedViewAsync(new CreateFeedViewRequest
{
    ID = feedViewId,
    ActivitySelectors = new List<ActivitySelectorConfig>
    {
        new() { Type = "recent" }
    },
    ActivityProcessors = new List<ActivityProcessorConfig>
    {
        new() { Type = "default" }
    },
    Aggregation = new AggregationConfig
    {
        Format = "time_based"
    }
});
var feedResponse1 = await _feedsV3Client.GetOrCreateFeedAsync(
    FeedGroupID: "user",
    FeedID: _testFeedId,
    request: new GetOrCreateFeedRequest { UserID = _testUserId }
);
var feedResponse2 = await _feedsV3Client.GetOrCreateFeedAsync(
    FeedGroupID: "user",
    FeedID: _testFeedId2,
    request: new GetOrCreateFeedRequest { UserID = _testUserId2 }
);

With custom feed views you can control

  • Activity selectors
  • Ranking
  • Aggregation

Updating feed views

It’s possible to update any custom or built-in feed views.

var updateResponse = await _feedsV3Client.UpdateFeedViewAsync("feedViewID", new UpdateFeedViewRequest
{
    ActivitySelectors = new List<ActivitySelectorConfig>
    {
        new() { Type = "popular", MinPopularity = 10 }
    },
    Aggregation = new AggregationConfig
    {
        Format = "popularity_based"
    }
});

Deleting feed views

await _feedsV3Client.DeleteFeedViewAsync("viewID-123");
© Getstream.io, Inc. All Rights Reserved.