When using server-side SDKs, the user_id parameter is required in the getOrCreate request. It's needed in order to automatically create a user. Client-side SDKs do not require this parameter as the user is authenticated via token.
// Feed with no extra fields, of feed group "user"let feed = client.feed(group: "user", id: "john")try await feed.getOrCreate()// More optionslet query = FeedQuery( group: "user", id: "jack", data: .init( description: "My personal feed", name: "jack", visibility: "public", filterTags: ["tech", "hiking", "cooking"] ))let feed2 = client.feed(for: query)try await feed.getOrCreate()
// Feed with no extra fields, of feed group "user"val feed = client.feed(group = "user", id = "john")feed.getOrCreate()// More optionsval query = FeedQuery( group = "user", id = "jack", data = FeedInputData( description = "My personal feed", name = "jack", visibility = FeedVisibility.Public, filterTags = listOf("tech", "hiking", "cooking") ))val feed2 = client.feed(query = query)feed2.getOrCreate()
// Feed with no extra fields, of feed group "user"const feed = client.feed("user", "jack");await feed.getOrCreate();// Subscribe to WebSocket events for state updatesawait feed.getOrCreate({ watch: true });// More optionsconst feed = client.feed("user", "jack");await feed.getOrCreate({ data: { description: "My personal feed", name: "jack", visibility: "public", filter_tags: ["tech", "hiking", "cooking"], },});
// Feed with no extra fields, of feed group "user"const feed = client.feed("user", "jack");await feed.getOrCreate();// Subscribe to WebSocket events for state updatesawait feed.getOrCreate({ watch: true });// More optionsconst feed = client.feed("user", "jack");await feed.getOrCreate({ data: { description: "My personal feed", name: "jack", visibility: "public", filter_tags: ["tech", "hiking", "cooking"], },});
// Feed with no extra fields, of feed group "user"const feed = client.feed("user", "jack");await feed.getOrCreate();// Subscribe to WebSocket events for state updatesawait feed.getOrCreate({ watch: true });// More optionsconst feed = client.feed("user", "jack");await feed.getOrCreate({ data: { description: "My personal feed", name: "jack", visibility: "public", filter_tags: ["tech", "hiking", "cooking"], },});
// Feed with no extra fields, of feed group "user"final feed = client.feed(group: 'user', id: 'john');await feed.getOrCreate();// More optionsconst query = FeedQuery( fid: FeedId(group: 'user', id: 'jack'), data: FeedInputData( description: 'My personal feed', name: 'jack', visibility: FeedVisibility.public, filterTags: ['tech', 'hiking', 'cooking'], ),);final feed2 = client.feedFromQuery(query);await feed2.getOrCreate();
// Feed with no extra fields, of feed group "user"const feed = client.feeds.feed("user", "jack");await feed.getOrCreate({ // The owner of the feed user_id: "<user id>",});// More optionsconst feed = client.feeds.feed("user", "jack");await feed.getOrCreate({ data: { description: "My personal feed", name: "jack", visibility: "public", filter_tags: ["tech", "hiking", "cooking"], }, // The owner of the feed user_id: "<user id>",});
let feed = client.feed(group: "user", id: "john")try await feed.getOrCreate()let feedData = feed.state.feedlet activities = feed.state.activitieslet members = feed.state.members
val feed = client.feed(group = "user", id = "john")feed.getOrCreate()val feedData = feed.state.feedval activities = feed.state.activitiesval members = feed.state.members
const feed = client.feed("user", "john");await feed.getOrCreate({ watch: true });const currentState = feed.state.getLatestValue();const visivility = currentState.visibility;const name = currentState.name;const description = currentState.description;const activities = currentState.activities;const members = currentState.members;// Or subscribe to state changesconst unsubscribe = feed.state.subscribe((state) => { // Called everytime the state changes console.log(state);});// or if you care only part of the stateconst unsubscribe2 = feed.state.subscribeWithSelector( (state) => ({ activities: state.activities, }), (state, prevState) => { console.log(state.activities, prevState?.activities); },);// Unsubscribe when you no longer want to recieve updatesunsubscribe();unsubscribe2();
final feed = client.feed(group: 'user', id: 'john');await feed.getOrCreate();final feedData = feed.state.feed;final activities = feed.state.activities;final members = feed.state.members;// Note: Always dispose the feed when you are done with itfeed.dispose();
You have more options when reading a feed, let's go over a few:
let query = FeedQuery( group: "user", id: "john", activityFilter: .in(.filterTags, ["green"]), // filter activities with filter tag green activityLimit: 10, externalRanking: ["user_score": 0.8], // additional data used for ranking followerLimit: 10, followingLimit: 10, memberLimit: 10, view: "myview", // overwrite the default ranking or aggregation logic for this feed. good for split testing watch: true // receive web-socket events with real-time updates)let feed = client.feed(for: query)try await feed.getOrCreate()let activities = feed.state.activitieslet feedData = feed.state.feed
val query = FeedQuery( group = "user", id = "john", activityFilter = ActivitiesFilterField.filterTags.`in`("green"), // filter activities with filter tag green activityLimit = 10, externalRanking = mapOf("user_score" to 0.8), // additional data used for ranking followerLimit = 10, followingLimit = 10, memberLimit = 10, view = "myview", // overwrite the default ranking or aggregation logic for this feed. good for split testing watch = true // receive web-socket events with real-time updates)val feed = client.feed(query = query)feed.getOrCreate()val activities = feed.state.activitiesval feedData = feed.state.feed
const feed = client.feed("user", "jack");const response = await feed.getOrCreate({ limit: 10, filter: { filter_tags: ["green"], // filter activities with filter tag green }, external_ranking: { user_score: 0.8, // additional data used for ranking }, followers_pagination: { limit: 10, }, following_pagination: { limit: 10, }, member_pagination: { limit: 10, }, view: "myview", // overwrite the default ranking or aggregation logic for this feed. good for split testing});
const feed = client.feed("user", "jack");const response = await feed.getOrCreate({ limit: 10, filter: { filter_tags: ["green"], // filter activities with filter tag green }, external_ranking: { user_score: 0.8, // additional data used for ranking }, followers_pagination: { limit: 10, }, following_pagination: { limit: 10, }, member_pagination: { limit: 10, }, view: "myview", // overwrite the default ranking or aggregation logic for this feed. good for split testing});
const feed = client.feed("user", "jack");const response = await feed.getOrCreate({ limit: 10, filter: { filter_tags: ["green"], // filter activities with filter tag green }, external_ranking: { user_score: 0.8, // additional data used for ranking }, followers_pagination: { limit: 10, }, following_pagination: { limit: 10, }, member_pagination: { limit: 10, }, view: "myview", // overwrite the default ranking or aggregation logic for this feed. good for split testing});
const query = FeedQuery( fid: FeedId(group: 'user', id: 'john'), // filter activities with filter tag green activityFilter: Filter.in_( ActivitiesFilterField.filterTags, ['green'], ), activityLimit: 10, // additional data used for ranking externalRanking: {'user_score': 0.8}, followerLimit: 10, followingLimit: 10, memberLimit: 10, // overwrite the default ranking or aggregation logic for this feed. good for split testing view: 'myview', // receive web-socket events with real-time updates watch: true,);final feed = client.feedFromQuery(query);await feed.getOrCreate();final activities = feed.state.activities;final feedData = feed.state.feed;// Note: Always dispose the feed when you are done with itfeed.dispose();
const feed = client.feeds.feed("user", "jack");const response = await feed.getOrCreate({ limit: 10, filter: { filter_tags: ["green"], // filter activities with filter tag green }, external_ranking: { user_score: 0.8, // additional data used for ranking }, followers_pagination: { limit: 10, }, following_pagination: { limit: 10, }, member_pagination: { limit: 10, }, view: "myview", // overwrite the default ranking or aggregation logic for this feed. good for split testing user_id: "<user id>",});
feed := client.Feeds().Feed("user", "jack")request := &getstream.GetOrCreateFeedRequest{ Limit: intPtr(10), UserID: stringPtr("<user id>"), View: stringPtr("myview"), Filter: map[string]any{ "filter_tags": []string{"green"}, // filter activities with filter tag green }, ExternalRanking: map[string]any{ "user_score": 0.8, // additional data used for ranking }, FollowersPagination: &getstream.PagerRequest{ Limit: intPtr(10), }, FollowingPagination: &getstream.PagerRequest{ Limit: intPtr(10), }, MemberPagination: &getstream.PagerRequest{ Limit: intPtr(10), },}response, err := feed.GetOrCreate(context.Background(), request)
You can control how activities are enriched when reading a feed by providing enrichment_options to the getOrCreate request. This allows you to customize which fields and related data are included in the response.
Performance Optimization: Enrichment options allow you to skip specific enrichments to improve performance.
Important Notes:
Reactions: If skip_activity_reactions is set to true, the expensive enrichment step is skipped. However, if reactions are already denormalized in the database, they will still be included in the response. This option only skips the expensive enrichment step but does not remove already-loaded data for performance reasons.
Followers/Following: If skip_followers or skip_following is set to true, fetching and enriching followers or following is skipped. However, if followers_pagination or following_pagination is explicitly provided in the request, followers or following will be fetched regardless of this setting. This ensures that explicit pagination requests are always honored.
val feed = client.feed( query = FeedQuery( group = "user", id = "john", activityLimit = 10 ))// Page 1feed.getOrCreate()val activities = feed.state.activities // First 10 activities// Page 2val page2Activities: Result<List<ActivityData>> = feed.queryMoreActivities(limit = 10)val page1And2Activities = feed.state.activities
const feed = client.feed("user", "jack");// First pageawait feed.getOrCreate({ limit: 10,});// Second pageawait feed.getNextPage();console.log(feed.state.getLatestValue().is_loading_activities);// Truthy if feed has next pageconsole.log(feed.state.getLatestValue().next);console.log(feed.state.getLatestValue().activities);// Only if feed group has aggregation turned onconsole.log(feed.state.getLatestValue().aggregated_activities);
const feed = client.feed("user", "jack");// First pageawait feed.getOrCreate({ limit: 10,});const { activities, loadNextPage, is_loading, has_next_page } = useFeedActivities(feed) ?? {};// Only if feed group has aggregation turned onconst { aggregated_activities, is_loading, has_next_page } = useAggregatedActivities(feed) ?? {};
const feed = client.feed("user", "jack");// First pageawait feed.getOrCreate({ limit: 10,});const { activities, loadNextPage, is_loading, has_next_page } = useFeedActivities(feed) ?? {};// Only if feed group has aggregation turned onconst { aggregated_activities, is_loading, has_next_page } = useAggregatedActivities(feed) ?? {};
filter provides a performant way to read a feed, and only select activities that match a given filter.
Please note that filtering is typically used for fields with fixed value sets (for example filter_tags), for text based search, you should check out query activities endpoint
// Add a few activitieslet feedId = FeedId(group: "user", id: "john")try await client.upsertActivities([ ActivityRequest(feeds: [feedId.rawValue], filterTags: ["green", "blue"], text: "first", type: "post"), ActivityRequest(feeds: [feedId.rawValue], filterTags: ["yellow", "blue"], text: "second", type: "post"), ActivityRequest(feeds: [feedId.rawValue], filterTags: ["orange"], text: "third", type: "post")])// Now read the feed, this will fetch activity 1 and 2let query = FeedQuery(feed: feedId, activityFilter: .in(.filterTags, ["blue"]))let feed = client.feed(for: query)try await feed.getOrCreate()let activities = feed.state.activities // contains first and second
// Add a few activitiesval fid = FeedId(group = "user", id = "john")client.upsertActivities( listOf( ActivityRequest(feeds = listOf(fid.rawValue), filterTags = listOf("green", "blue"), text = "first", type = "post"), ActivityRequest(feeds = listOf(fid.rawValue), filterTags = listOf("yellow", "blue"), text = "second", type = "post"), ActivityRequest(feeds = listOf(fid.rawValue), filterTags = listOf("orange"), text = "third", type = "post") ))// Now read the feed, this will fetch activity 1 and 2val query = FeedQuery(fid = fid, activityFilter = ActivitiesFilterField.filterTags.`in`("blue"))val feed = client.feed(query = query)feed.getOrCreate()val activities = feed.state.activities // contains first and second
const feed = client.feed("user", "123", { // WebSocket events are delivered regardless of filters, you can filter them by providing activityAddedEventFilter activityAddedEventFilter: (event) => event.activity.filter_tags.includes("blue"),});// Add a few activitiesclient.upsertActivities({ activities: [ { feeds: [feed.feed], type: "post", text: "first", filter_tags: ["green", "blue"], }, { feeds: [feed.feed], type: "post", text: "second", filter_tags: ["yellow", "blue"], }, { feeds: [feed.feed], type: "post", text: "third", filter_tags: ["orange"], }, ],});const response = await feed.getOrCreate({ watch: true, filter: { filter_tags: ["blue"], },});
const feed = client.feed("user", "123", { // WebSocket events are delivered regardless of filters, you can filter them by providing activityAddedEventFilter activityAddedEventFilter: (event) => event.activity.filter_tags.includes("blue"),});// Add a few activitiesclient.upsertActivities({ activities: [ { feeds: [feed.feed], type: "post", text: "first", filter_tags: ["green", "blue"], }, { feeds: [feed.feed], type: "post", text: "second", filter_tags: ["yellow", "blue"], }, { feeds: [feed.feed], type: "post", text: "third", filter_tags: ["orange"], }, ],});const response = await feed.getOrCreate({ watch: true, filter: { filter_tags: ["blue"], },});
const feed = client.feed("user", "123", { // WebSocket events are delivered regardless of filters, you can filter them by providing activityAddedEventFilter activityAddedEventFilter: (event) => event.activity.filter_tags.includes("blue"),});// Add a few activitiesclient.upsertActivities({ activities: [ { feeds: [feed.feed], type: "post", text: "first", filter_tags: ["green", "blue"], }, { feeds: [feed.feed], type: "post", text: "second", filter_tags: ["yellow", "blue"], }, { feeds: [feed.feed], type: "post", text: "third", filter_tags: ["orange"], }, ],});const response = await feed.getOrCreate({ watch: true, filter: { filter_tags: ["blue"], },});
// Add a few activitiesconst feedId = FeedId(group: 'user', id: 'john');await client.upsertActivities( activities: [ ActivityRequest( feeds: [feedId.rawValue], filterTags: const ['green', 'blue'], text: 'first', type: 'post', ), ActivityRequest( feeds: [feedId.rawValue], filterTags: const ['yellow', 'blue'], text: 'second', type: 'post', ), ActivityRequest( feeds: [feedId.rawValue], filterTags: const ['orange'], text: 'third', type: 'post', ), ],);// Now read the feed, this will fetch activity 1 and 2const query = FeedQuery( fid: feedId, activityFilter: Filter.in_(ActivitiesFilterField.filterTags, ['blue']),);final feed = client.feedFromQuery(query);await feed.getOrCreate();// contains first and secondfinal activities = feed.state.activities;
The filter syntax also supports $or and $and, so here's an example that's a little more complicated:
// Get all the activities where filter tags contain both "green" and "orange"let query = FeedQuery( group: "user", id: "john", activityFilter: .and([ .in(.filterTags, ["green"]), .in(.filterTags, ["orange"]) ]))try await feed.getOrCreate()let activities = feed.state.activities
// Get all the activities where filter tags contain both "green" and "orange"val query = FeedQuery( group = "user", id = "john", activityFilter = Filters.and( ActivitiesFilterField.filterTags.`in`("green"), ActivitiesFilterField.filterTags.`in`("orange"), ))feed.getOrCreate()val activities = feed.state.activities
// Get all the activities where filter tags contain both "green" and "orange"const response = await feed.getOrCreate({ filter: { $and: [{ filter_tags: ["green"] }, { filter_tags: ["orange"] }], },});
// Get all the activities where filter tags contain both "green" and "orange"const response = await feed.getOrCreate({ filter: { $and: [{ filter_tags: ["green"] }, { filter_tags: ["orange"] }], },});
// Get all the activities where filter tags contain both "green" and "orange"const response = await feed.getOrCreate({ filter: { $and: [{ filter_tags: ["green"] }, { filter_tags: ["orange"] }], },});
// Get all the activities where filter tags contain both "green" and "orange"const query = FeedQuery( fid: FeedId(group: 'user', id: 'john'), activityFilter: Filter.and([ Filter.in_(ActivitiesFilterField.filterTags, ['green']), Filter.in_(ActivitiesFilterField.filterTags, ['orange']), ]),);final feed = client.feedFromQuery(query);await feed.getOrCreate();final activities = feed.state.activities;
// Get all the activities where filter tags contain both "green" and "orange"const response = await feed.getOrCreate({ filter: { $and: [ { filter_tags: ["green"] } { filter_tags: ["orange"] } ], }, user_id: "<user id>",});
// Get all the activities where filter tags contain both "green" and "orange"feed := client.Feeds().Feed("user", "john")response, err := feed.GetOrCreate(ctx, &getstream.GetOrCreateFeedRequest{ Filter: map[string]any{ "$and": []map[string]any{ {"filter_tags": []string{"green"}}, {"filter_tags": []string{"orange"}}, }, }, UserID: getstream.PtrTo("john"),})if err != nil { log.Fatal("Error getting feed with filter:", err)}log.Printf("Activities: %+v", response.Data.Activities)
// Get all the activities where filter tags contain both "green" and "orange"Map<String, Object> filter = new HashMap<>();List<Map<String, Object>> andConditions = List.of( Map.of("filter_tags", List.of("green")), Map.of("filter_tags", List.of("orange")));filter.put("$and", andConditions);GetOrCreateFeedRequest request = GetOrCreateFeedRequest.builder() .filter(filter) .userID("john") .build();GetOrCreateFeedResponse response = feeds.getOrCreateFeed("user", "john", request).execute().getData();
// Get all the activities where filter tags contain both "green" and "orange"var response = await _feedsV3Client.GetOrCreateFeedAsync( FeedGroupID: "user", FeedID: "john", request: new GetOrCreateFeedRequest { Filter = new { and = new[] { new { filter_tags = new[] { "green" } }, new { filter_tags = new[] { "orange" } } } }, UserID = "john" });
# Get all the activities where filter tags contain both "green" and "orange"response = feeds.get_or_create_feed( feed_group="user", feed_id="john", filter={ "$and": [ {"filter_tags": ["green"]}, {"filter_tags": ["orange"]} ] }, user_id="john")
# Get all the activities where filter tags contain both "green" and "orange"response = client.feeds.get_or_create_feed( "user", "john", GetStream::Generated::Models::GetOrCreateFeedRequest.new( filter: { "$and" => [ { "filter_tags" => ["green"] }, { "filter_tags" => ["orange"] } ] }, user_id: "john" ))
What filters you can use when reading a feed depends on the feed group (or view, if provided) configuration.
The activity selectors page explains this in detail, but some quick examples: the user group uses current selector, and the timeline group the following selector by default.
The following filter options are available for the following selector:
When filtering by filter_tags, a plain array (or $eq) uses AND-logic: the activity must contain all of the specified tags. Use $in if you want OR-logic, where the activity must contain any of the specified tags.
The filter syntax also supports $or and $and:
// Get all the activities where filter tags contain both "green" and "orange"let filter = .and([ .in(.filterTags, ["green"]), .in(.filterTags, ["orange"])])
// Get all the activities where filter tags contain both "green" and "orange"val filter = Filters.and( ActivitiesFilterField.filterTags.`in`("green"), ActivitiesFilterField.filterTags.`in`("orange"),)
// Get all the activities where filter tags contain both "green" and "orange"const filter = { $and: [{ filter_tags: ["green"] }, { filter_tags: ["orange"] }],};
// Get all the activities where filter tags contain both "green" and "orange"const filter = { $and: [{ filter_tags: ["green"] }, { filter_tags: ["orange"] }],};
// Get all the activities where filter tags contain both "green" and "orange"const filter = { $and: [{ filter_tags: ["green"] }, { filter_tags: ["orange"] }],};
// Get all the activities where filter tags contain both "green" and "orange"const filter = Filter.and([ Filter.in_(ActivitiesFilterField.filterTags, ['green']), Filter.in_(ActivitiesFilterField.filterTags, ['orange']),])
// Get all the activities where filter tags contain both "green" and "orange"const filter = { $and: [ { filter_tags: ["green"] } { filter_tags: ["orange"] } ],}
// Get all the activities where filter tags contain both "green" and "orange"filter := map[string]any{ "$and": []map[string]any{ {"filter_tags": []string{"green"}}, {"filter_tags": []string{"orange"}}, },}
// Get all the activities where filter tags contain both "green" and "orange"Map<String, Object> filter = new HashMap<>();List<Map<String, Object>> andConditions = List.of( Map.of("filter_tags", List.of("green")), Map.of("filter_tags", List.of("orange")));filter.put("$and", andConditions);
// Get all the activities where filter tags contain both "green" and "orange"var filter = = new{ and = new[] { new { filter_tags = new[] { "green" } }, new { filter_tags = new[] { "orange" } } }}
# Get all the activities where filter tags contain both "green" and "orange"filter = { "$and": [ {"filter_tags": ["green"]}, {"filter_tags": ["orange"]} ]}
# Get all the activities where filter tags contain both "green" and "orange"filter = { "$and" => [ { "filter_tags" => ["green"] }, { "filter_tags" => ["orange"] } ]}
When providing filter to read a feed, activity selector filters on group/view level are ignored.
The updateFeed endpoint performs a partial update: only the fields you include in the request are changed, and each of those fields is completely overwritten.
Since updateFeed is a partial update, omitting location from the request leaves it unchanged. To explicitly remove a feed's location, set clear_location to true:
Deleting a feed is an irreversible operation. This goes for both soft and hard deletes.
Deleting a feed will cascade delete the following entities:
Follows - any follow relationship this feed is part of will be deleted
Feed members
Pinned activities
Activity marks (read/seen)
Activities - the following will be deleted for each activity
Reactions
Bookmarks
Comments - the following will be deleted for each comment
Reactions
The deletion of a feed will be done asynchronously. If the endpoint is called server side a task_id is returned and you
can use this task ID to track the deletion process.
The difference between a hard and soft delete is that soft deleting will soft delete the entities that supports this.
These are feeds, activities and comments. Soft deleted activities will retain their reactions and bookmarks until hard deleted. Soft deleted comments will retain their reactions until hard deleted.
This means that this data can still be exported with the export endpoint.
// Soft delete a feedtry await feed.delete(hardDelete: false)// Hard delete a feedtry await feed.delete(hardDelete: true)
// Soft delete a feedfeed.delete(hardDelete = false)// Hard delete a feedfeed.delete(hardDelete = true)
// Soft delete a feedawait feed.delete({ hard_delete: false });// Hard delete a feedawait feed.delete({ hard_delete: true });
// Soft delete a feedawait feed.delete({ hard_delete: false });// Hard delete a feedawait feed.delete({ hard_delete: true });
// Soft delete a feedawait feed.delete({ hard_delete: false });// Hard delete a feedawait feed.delete({ hard_delete: true });
// Soft delete a feedawait feed.delete(hardDelete: false);// Hard delete a feedawait feed.delete(hardDelete: true);
// Soft delete a feedconst response = await feed.delete({ hard_delete: false });// Hard delete a feedconst response = await feed.delete({ hard_delete: true });// Check task progress for server side requests (you need to poll getTask)const taskResponse = await client.getTask({ id: response.task_id });console.log(taskResponse.status === "completed");
// Soft delete a feedresponse, err := feed.Delete(context.Background(), &getstream.DeleteFeedRequest{ HardDelete: getstream.PtrTo(false),})// Hard delete a feedresponse, err := feed.Delete(context.Background(), &getstream.DeleteFeedRequest{ HardDelete: getstream.PtrTo(true),})// Check task progress (you need to poll GetTask)taskResponse, err := client.GetTask(context.Background(), response.Data.TaskID, &getstream.GetTaskRequest{})fmt.Println(taskResponse.Data.Status == "completed")
// Soft delete a feedDeleteFeedRequest deleteRequest = DeleteFeedRequest.builder() .hardDelete(false) .build();DeleteFeedResponse response = feed.delete(deleteRequest).getData();// Hard delete a feedDeleteFeedRequest hardDeleteRequest = DeleteFeedRequest.builder() .hardDelete(true) .build();feed.delete(hardDeleteRequest);// Check task progress (you need to poll getTask)GetTaskResponse taskResponse = client.getTask(response.getTaskId()).getData();System.out.println(taskResponse.getStatus().equals("completed"));
// Soft delete a feed$response = $feed->delete( new GeneratedModels\DeleteFeedRequest(hardDelete: false));// Hard delete a feed$response = $feed->delete( new GeneratedModels\DeleteFeedRequest(hardDelete: true));// Check task progress (you need to poll getTask)$taskResponse = $client->getTask($response->getData()->taskID);echo $taskResponse->getData()->status === 'completed';
// Soft delete a feedvar response = await feed.DeleteAsync(new DeleteFeedRequest { HardDelete = false });// Hard delete a feedawait feed.DeleteAsync(new DeleteFeedRequest { HardDelete = true });// Check task progress (you need to poll GetTaskAsync)var taskResponse = await client.GetTaskAsync(response.TaskId);Console.WriteLine(taskResponse.Status == "completed");
# Soft delete a feedresponse = feed.delete(hard_delete=False)# Hard delete a feedresponse = feed.delete(hard_delete=True)# Check task progress (you need to poll get_task)task_response = client.get_task(response.task_id)print(task_response.status == "completed")
require 'getstream_ruby'# Soft delete a feedresponse = feed.delete(hard_delete: false)# Hard delete a feedresponse = feed.delete(hard_delete: true)# Check task progress (you need to poll get_task)task_response = client.get_task(response.task_id)puts task_response.status == 'completed'
feeds = [ { "feed_id": f"feed_{i}", "feed_group_id": "user", "name": f"Feed {i}", "visibility": "public", } for i in range(100)]response = client.feeds.create_feeds_batch(feeds=feeds)feed_ids = [f["feed"] for f in response["feeds"]]client.feeds.delete_feeds_batch(feeds=feed_ids, hard_delete=True)