Appearance
Feeds
About 29386 wordsAbout 98 min
Go-Serverside SDK - Feeds API
Table of Contents
- AddActivity
- UpsertActivities
- UpdateActivitiesPartialBatch
- DeleteActivities
- TrackActivityMetrics
- QueryActivities
- AddBookmark
- UpdateBookmark
- DeleteBookmark
- ActivityFeedback
- CastPollVote
- DeletePollVote
- AddActivityReaction
- QueryActivityReactions
- DeleteActivityReaction
- GetActivity
- UpdateActivity
- UpdateActivityPartial
- DeleteActivity
- RestoreActivity
- QueryBookmarkFolders
- UpdateBookmarkFolder
- DeleteBookmarkFolder
- QueryBookmarks
- ReadCollections
- CreateCollections
- UpsertCollections
- UpdateCollections
- DeleteCollections
- QueryCollections
- GetComments
- AddComment
- AddCommentsBatch
- QueryComments
- AddCommentBookmark
- UpdateCommentBookmark
- DeleteCommentBookmark
- GetComment
- UpdateComment
- DeleteComment
- UpdateCommentPartial
- AddCommentReaction
- QueryCommentReactions
- DeleteCommentReaction
- GetCommentReplies
- RestoreComment
- ListFeedGroups
- CreateFeedGroup
- GetOrCreateFeed
- UpdateFeed
- DeleteFeed
- MarkActivity
- PinActivity
- UnpinActivity
- UpdateFeedMembers
- AcceptFeedMemberInvite
- QueryFeedMembers
- RejectFeedMemberInvite
- QueryPinnedActivities
- GetFollowSuggestions
- RestoreFeedGroup
- GetFeedGroup
- GetOrCreateFeedGroup
- UpdateFeedGroup
- DeleteFeedGroup
- ListFeedViews
- CreateFeedView
- GetFeedView
- GetOrCreateFeedView
- UpdateFeedView
- DeleteFeedView
- ListFeedVisibilities
- GetFeedVisibility
- UpdateFeedVisibility
- CreateFeedsBatch
- DeleteFeedsBatch
- OwnBatch
- QueryFeeds
- GetFeedsRateLimits
- Follow
- UpdateFollow
- AcceptFollow
- FollowBatch
- GetOrCreateFollows
- QueryFollows
- RejectFollow
- Unfollow
- CreateMembershipLevel
- QueryMembershipLevels
- UpdateMembershipLevel
- DeleteMembershipLevel
- QueryFeedsUsageStats
- UnfollowBatch
- GetOrCreateUnfollows
- DeleteFeedUserData
- ExportFeedUserData
- Types Reference
AddActivity
Add a single activity to a feed, allowing users to share updates or events. Use this when you want to introduce new content to a feed.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Add a single activity
resp, err := feedsClient.AddActivity(context.Background(), &stream.AddActivityRequest{
Feeds: []string{"user:john", "timeline:global"},
Type: "like",
UserID: stream.PtrTo("john"),
ID: stream.PtrTo("activity-123"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with text and skip_push
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Add a single activity
resp, err := feedsClient.AddActivity(context.Background(), &stream.AddActivityRequest{
Feeds: []string{"user:john", "timeline:global"},
Type: "like",
Text: stream.PtrTo("Hello, world!"),
SkipPush: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with visibility and enrich_own_fields
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Add a single activity
resp, err := feedsClient.AddActivity(context.Background(), &stream.AddActivityRequest{
Feeds: []string{"user:john", "timeline:global"},
Type: "like",
Visibility: stream.PtrTo("public"),
EnrichOwnFields: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with expires_at and filter_tags
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Add a single activity
resp, err := feedsClient.AddActivity(context.Background(), &stream.AddActivityRequest{
Feeds: []string{"user:john", "timeline:global"},
Type: "like",
ExpiresAt: stream.PtrTo("value"),
FilterTags: []string{"tag1", "tag2"},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: AddActivityResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Feeds | []string | Yes | List of feeds to add the activity to with a default max limit of 25 feeds |
| Type | string | Yes | Type of activity |
| Attachments | []Attachment | No | List of attachments for the activity |
| CollectionRefs | []string | No | Collections that this activity references |
| CopyCustomToNotification | bool | No | Whether to copy custom data to the notification activity (only applies when create_notification_a... |
| CreateNotificationActivity | bool | No | Whether to create notification activities for mentioned users |
| Custom | map[string]any | No | Custom data for the activity |
| EnrichOwnFields | bool | No | - |
| ExpiresAt | string | No | Expiration time for the activity |
| FilterTags | []string | No | Tags for filtering activities |
| ForceModeration | bool | No | - |
| ID | string | No | Optional ID for the activity |
| InterestTags | []string | No | Tags for indicating user interests |
| Location | Location | No | Geographic location related to the activity |
| MentionedUserIds | []string | No | List of users mentioned in the activity |
| ParentID | string | No | ID of parent activity for replies/comments |
| PollID | string | No | ID of a poll to attach to activity |
| RestrictReplies | string | No | Controls who can add comments/replies to this activity. One of: everyone, people_i_follow, nobody |
| SearchData | map[string]any | No | Additional data for search indexing |
| SkipEnrichURL | bool | No | Whether to skip URL enrichment for the activity |
| SkipPush | bool | No | Whether to skip push notifications |
| Text | string | No | Text content of the activity |
| UserID | string | No | ID of the user creating the activity |
| Visibility | string | No | Visibility setting for the activity. One of: public, private, tag |
| VisibilityTag | string | No | If visibility is 'tag', this is the tag name and is required |
UpsertActivities
Add or update multiple activities in a batch, optimizing feed management by ensuring activities are current and efficiently handled. Use this for bulk operations where activities might need to be created or modified.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Upsert multiple activities
resp, err := feedsClient.UpsertActivities(context.Background(), &stream.UpsertActivitiesRequest{
Activities: []stream.ActivityRequest{{Type: "like", ID: stream.PtrTo("activity-123"), ParentID: stream.PtrTo("parent-123"), PollID: stream.PtrTo("poll-123"), SkipPush: stream.PtrTo(false), Text: stream.PtrTo("Hello, world!"), UserID: stream.PtrTo("john"), Visibility: stream.PtrTo("public")}},
EnrichOwnFields: stream.PtrTo(false),
ForceModeration: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UpsertActivitiesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Activities | []ActivityRequest | Yes | List of activities to create or update |
| EnrichOwnFields | bool | No | If true, enriches the activities' current_feed with own_* fields (own_follows, own_followings, ow... |
| ForceModeration | bool | No | If true, forces moderation to run for server-side requests. By default, server-side requests skip... |
UpdateActivitiesPartialBatch
Use this method to update specific fields of multiple activities in bulk without overwriting the entire activity data, ideal for making incremental changes efficiently.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Batch partial activity update
resp, err := feedsClient.UpdateActivitiesPartialBatch(context.Background(), &stream.UpdateActivitiesPartialBatchRequest{
Changes: []stream.UpdateActivityPartialChangeRequest{{ActivityID: "activity-123"}},
ForceModeration: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UpdateActivitiesPartialBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Changes | []UpdateActivityPartialChangeRequest | Yes | List of activity changes to apply. Each change specifies an activity ID and the fields to set/unset |
| ForceModeration | bool | No | If true, forces moderation to run for server-side requests. By default, server-side requests skip... |
DeleteActivities
Remove multiple activities from a feed to keep it relevant and tidy. Use this when you need to clear outdated or unwanted content from a feed.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Remove multiple activities
resp, err := feedsClient.DeleteActivities(context.Background(), &stream.DeleteActivitiesRequest{
Ids: []string{"activity-1", "activity-2"},
UserID: stream.PtrTo("john"),
HardDelete: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with user and delete_notification_activity
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Remove multiple activities
resp, err := feedsClient.DeleteActivities(context.Background(), &stream.DeleteActivitiesRequest{
Ids: []string{"activity-1", "activity-2"},
User: &stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
DeleteNotificationActivity: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: DeleteActivitiesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Ids | []string | Yes | List of activity IDs to delete |
| DeleteNotificationActivity | bool | No | Whether to also delete any notification activities created from mentions in these activities |
| HardDelete | bool | No | Whether to permanently delete the activities |
| User | UserRequest | No | - |
| UserID | string | No | - |
TrackActivityMetrics
Monitors and records user interactions with activities, providing insights into user engagement and behavior. Use this to analyze activity trends and optimize content strategy.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Track activity metrics
resp, err := feedsClient.TrackActivityMetrics(context.Background(), &stream.TrackActivityMetricsRequest{
Events: []stream.TrackActivityMetricsEvent{{ActivityID: "activity-123"}},
UserID: stream.PtrTo("john"),
User: &stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: TrackActivityMetricsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Events | []TrackActivityMetricsEvent | Yes | List of metric events to track (max 100 per request) |
| User | UserRequest | No | - |
| UserID | string | No | - |
QueryActivities
Retrieve a list of activities based on specific criteria, enabling users to access relevant content quickly. Use this to filter and display activities that match certain conditions.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query activities
resp, err := feedsClient.QueryActivities(context.Background(), &stream.QueryActivitiesRequest{
UserID: stream.PtrTo("john"),
Limit: stream.PtrTo(25),
Filter: map[string]any{},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with sort and include_soft_deleted_activities
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query activities
resp, err := feedsClient.QueryActivities(context.Background(), &stream.QueryActivitiesRequest{
Sort: []stream.SortParamRequest{{Direction: stream.PtrTo(-1), Field: stream.PtrTo("created_at"), Type: stream.PtrTo("like")}},
IncludeSoftDeletedActivities: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with enrich_own_fields and next
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query activities
resp, err := feedsClient.QueryActivities(context.Background(), &stream.QueryActivitiesRequest{
EnrichOwnFields: stream.PtrTo(false),
Next: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with prev and include_expired_activities
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query activities
resp, err := feedsClient.QueryActivities(context.Background(), &stream.QueryActivitiesRequest{
Prev: nil,
IncludeExpiredActivities: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: QueryActivitiesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| EnrichOwnFields | bool | No | - |
| Filter | map[string]any | No | Filters to apply to the query. Supports location-based queries with 'near' and 'within_bounds' op... |
| IncludeExpiredActivities | bool | No | When true, include both expired and non-expired activities in the result. |
| IncludePrivateActivities | bool | No | - |
| IncludeSoftDeletedActivities | bool | No | When true, include soft-deleted activities in the result. |
| Limit | int | No | - |
| Next | string | No | - |
| Prev | string | No | - |
| Sort | []SortParamRequest | No | Sorting parameters for the query |
| User | UserRequest | No | - |
| UserID | string | No | - |
AddBookmark
Save a specific item or activity for easy retrieval later, enhancing user experience by allowing quick access to important content. Use this to enable users to mark favorites or important items.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Add bookmark
resp, err := feedsClient.AddBookmark(context.Background(), &stream.AddBookmarkRequest{
ActivityID: "activity-123",
UserID: stream.PtrTo("john"),
FolderID: stream.PtrTo("folder-123"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with new_folder and user
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Add bookmark
resp, err := feedsClient.AddBookmark(context.Background(), &stream.AddBookmarkRequest{
ActivityID: "activity-123",
NewFolder: &stream.AddFolderRequest{Name: "My Feed", Custom: map[string]any{}},
User: &stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with custom
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Add bookmark
resp, err := feedsClient.AddBookmark(context.Background(), &stream.AddBookmarkRequest{
ActivityID: "activity-123",
Custom: map[string]any{},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: AddBookmarkResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ActivityID | string | Yes | - |
| Custom | map[string]any | No | Custom data for the bookmark |
| FolderID | string | No | ID of the folder to add the bookmark to |
| NewFolder | AddFolderRequest | No | Create a new folder for this bookmark |
| User | UserRequest | No | - |
| UserID | string | No | - |
UpdateBookmark
Modify the details of an existing bookmark to keep saved content accurate and useful. Use this when there is a need to change the information associated with a bookmark.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update bookmark
resp, err := feedsClient.UpdateBookmark(context.Background(), &stream.UpdateBookmarkRequest{
ActivityID: "activity-123",
UserID: stream.PtrTo("john"),
FolderID: stream.PtrTo("folder-123"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with new_folder and new_folder_id
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update bookmark
resp, err := feedsClient.UpdateBookmark(context.Background(), &stream.UpdateBookmarkRequest{
ActivityID: "activity-123",
NewFolder: &stream.AddFolderRequest{Name: "My Feed", Custom: map[string]any{}},
NewFolderID: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with user and custom
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update bookmark
resp, err := feedsClient.UpdateBookmark(context.Background(), &stream.UpdateBookmarkRequest{
ActivityID: "activity-123",
User: &stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
Custom: map[string]any{},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UpdateBookmarkResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ActivityID | string | Yes | - |
| Custom | map[string]any | No | Custom data for the bookmark |
| FolderID | string | No | ID of the folder containing the bookmark |
| NewFolder | AddFolderRequest | No | Create a new folder and move the bookmark into it |
| NewFolderID | string | No | Move the bookmark to this folder (empty string removes the folder) |
| User | UserRequest | No | - |
| UserID | string | No | - |
DeleteBookmark
Remove a bookmark from the saved list to declutter a user's stored items. Use this when a bookmarked item is no longer needed or relevant.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Delete a bookmark
resp, err := feedsClient.DeleteBookmark(context.Background(), &stream.DeleteBookmarkRequest{
ActivityID: "activity-123",
UserID: stream.PtrTo("john"),
FolderID: stream.PtrTo("folder-123"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: DeleteBookmarkResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ActivityID | string | Yes | - |
| FolderID | string | No | - |
| UserID | string | No | - |
ActivityFeedback
Submit user feedback on an activity to enhance personalization and content relevance. Use this to gather user preferences and improve content recommendations.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Provide feedback on an activity
resp, err := feedsClient.ActivityFeedback(context.Background(), &stream.ActivityFeedbackRequest{
ActivityID: "activity-123",
UserID: stream.PtrTo("john"),
ShowLess: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with show_more and user
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Provide feedback on an activity
resp, err := feedsClient.ActivityFeedback(context.Background(), &stream.ActivityFeedbackRequest{
ActivityID: "activity-123",
ShowMore: stream.PtrTo(false),
User: &stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with hide
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Provide feedback on an activity
resp, err := feedsClient.ActivityFeedback(context.Background(), &stream.ActivityFeedbackRequest{
ActivityID: "activity-123",
Hide: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: ActivityFeedbackResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ActivityID | string | Yes | - |
| Hide | bool | No | Whether to hide this activity |
| ShowLess | bool | No | Whether to show less content like this |
| ShowMore | bool | No | Whether to show more content like this |
| User | UserRequest | No | - |
| UserID | string | No | - |
CastPollVote
Register a user’s vote in a poll, contributing to collective decision-making or opinion-sharing. Use this to capture user opinions in polls.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Cast vote
resp, err := feedsClient.CastPollVote(context.Background(), &stream.CastPollVoteRequest{
ActivityID: "activity-123",
PollID: "poll-123",
UserID: stream.PtrTo("john"),
User: &stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with vote
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Cast vote
resp, err := feedsClient.CastPollVote(context.Background(), &stream.CastPollVoteRequest{
ActivityID: "activity-123",
PollID: "poll-123",
Vote: &stream.VoteData{AnswerText: "value"},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: PollVoteResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ActivityID | string | Yes | - |
| PollID | string | Yes | - |
| User | UserRequest | No | - |
| UserID | string | No | - |
| Vote | VoteData | No | Vote data |
DeletePollVote
Remove a user's vote from a poll, allowing for changes in decision or corrections. Use this when a user needs to retract or alter their vote in a poll.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Delete vote
resp, err := feedsClient.DeletePollVote(context.Background(), &stream.DeletePollVoteRequest{
ActivityID: "activity-123",
PollID: "poll-123",
VoteID: "vote-123",
UserID: stream.PtrTo("john"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: PollVoteResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ActivityID | string | Yes | - |
| PollID | string | Yes | - |
| VoteID | string | Yes | - |
| UserID | string | No | - |
AddActivityReaction
Add a reaction to a specified activity to engage users and track interactions. Use this method to express preferences or sentiments towards an activity.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Add reaction
resp, err := feedsClient.AddActivityReaction(context.Background(), &stream.AddActivityReactionRequest{
ActivityID: "activity-123",
Type: "like",
UserID: stream.PtrTo("john"),
SkipPush: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with custom and enforce_unique
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Add reaction
resp, err := feedsClient.AddActivityReaction(context.Background(), &stream.AddActivityReactionRequest{
ActivityID: "activity-123",
Type: "like",
Custom: map[string]any{},
EnforceUnique: stream.PtrTo(true),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with copy_custom_to_notification and user
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Add reaction
resp, err := feedsClient.AddActivityReaction(context.Background(), &stream.AddActivityReactionRequest{
ActivityID: "activity-123",
Type: "like",
CopyCustomToNotification: stream.PtrTo(false),
User: &stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with create_notification_activity
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Add reaction
resp, err := feedsClient.AddActivityReaction(context.Background(), &stream.AddActivityReactionRequest{
ActivityID: "activity-123",
Type: "like",
CreateNotificationActivity: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: AddReactionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ActivityID | string | Yes | - |
| Type | string | Yes | Type of reaction |
| CopyCustomToNotification | bool | No | Whether to copy custom data to the notification activity (only applies when create_notification_a... |
| CreateNotificationActivity | bool | No | Whether to create a notification activity for this reaction |
| Custom | map[string]any | No | Custom data for the reaction |
| EnforceUnique | bool | No | Whether to enforce unique reactions per user (remove other reaction types from the user when addi... |
| SkipPush | bool | No | - |
| User | UserRequest | No | - |
| UserID | string | No | - |
QueryActivityReactions
Retrieve a list of reactions associated with a specific activity to analyze user engagement and response patterns. Use this to gain insights into activity interactions.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query activity reactions
resp, err := feedsClient.QueryActivityReactions(context.Background(), &stream.QueryActivityReactionsRequest{
ActivityID: "activity-123",
Limit: stream.PtrTo(25),
Filter: map[string]any{},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with sort and prev
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query activity reactions
resp, err := feedsClient.QueryActivityReactions(context.Background(), &stream.QueryActivityReactionsRequest{
ActivityID: "activity-123",
Sort: []stream.SortParamRequest{{Direction: stream.PtrTo(-1), Field: stream.PtrTo("created_at"), Type: stream.PtrTo("like")}},
Prev: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with next
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query activity reactions
resp, err := feedsClient.QueryActivityReactions(context.Background(), &stream.QueryActivityReactionsRequest{
ActivityID: "activity-123",
Next: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: QueryActivityReactionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ActivityID | string | Yes | - |
| Filter | map[string]any | No | - |
| Limit | int | No | - |
| Next | string | No | - |
| Prev | string | No | - |
| Sort | []SortParamRequest | No | - |
DeleteActivityReaction
Remove a reaction from an activity to update user feedback or correct erroneous inputs. Use this when a reaction needs to be retracted or modified.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Remove reaction
resp, err := feedsClient.DeleteActivityReaction(context.Background(), &stream.DeleteActivityReactionRequest{
ActivityID: "activity-123",
Type: "like",
UserID: stream.PtrTo("john"),
DeleteNotificationActivity: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: DeleteActivityReactionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ActivityID | string | Yes | - |
| Type | string | Yes | - |
| DeleteNotificationActivity | bool | No | - |
| UserID | string | No | - |
GetActivity
Fetch details of a specific activity to view or display the current state and content. Use this to retrieve complete information about an activity for further processing or display.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Get activity
resp, err := feedsClient.GetActivity(context.Background(), &stream.GetActivityRequest{
ID: "activity-123",
UserID: stream.PtrTo("john"),
CommentLimit: stream.PtrTo(10),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with comment_sort
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Get activity
resp, err := feedsClient.GetActivity(context.Background(), &stream.GetActivityRequest{
ID: "activity-123",
CommentSort: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: GetActivityResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
| CommentSort | string | No | - |
| CommentLimit | int | No | - |
| UserID | string | No | - |
UpdateActivity
Replace all information of a specific activity to reflect new content or corrections. Use this when a full update of the activity's data is necessary.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Full activity update
resp, err := feedsClient.UpdateActivity(context.Background(), &stream.UpdateActivityRequest{
ID: "activity-123",
UserID: stream.PtrTo("john"),
Text: stream.PtrTo("Hello, world!"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with feeds and visibility
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Full activity update
resp, err := feedsClient.UpdateActivity(context.Background(), &stream.UpdateActivityRequest{
ID: "activity-123",
Feeds: []string{"user:john", "timeline:global"},
Visibility: stream.PtrTo("public"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with enrich_own_fields and expires_at
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Full activity update
resp, err := feedsClient.UpdateActivity(context.Background(), &stream.UpdateActivityRequest{
ID: "activity-123",
EnrichOwnFields: stream.PtrTo(false),
ExpiresAt: &10,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with attachments and filter_tags
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Full activity update
resp, err := feedsClient.UpdateActivity(context.Background(), &stream.UpdateActivityRequest{
ID: "activity-123",
Attachments: []stream.Attachment{{Text: stream.PtrTo("Hello, world!"), Type: stream.PtrTo("like")}},
FilterTags: []string{"tag1", "tag2"},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UpdateActivityResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
| Attachments | []Attachment | No | List of attachments for the activity |
| CollectionRefs | []string | No | Collections that this activity references |
| CopyCustomToNotification | bool | No | Whether to copy custom data to the notification activity (only applies when handle_mention_notifi... |
| Custom | map[string]any | No | Custom data for the activity |
| EnrichOwnFields | bool | No | If true, enriches the activity's current_feed with own_* fields (own_follows, own_followings, own... |
| ExpiresAt | float | No | Time when the activity will expire |
| Feeds | []string | No | List of feeds the activity is present in |
| FilterTags | []string | No | Tags used for filtering the activity |
| ForceModeration | bool | No | If true, forces moderation to run for server-side requests. By default, server-side requests skip... |
| HandleMentionNotifications | bool | No | If true, creates notification activities for newly mentioned users and deletes notifications for ... |
| InterestTags | []string | No | Tags indicating interest categories |
| Location | Location | No | Geographic location for the activity |
| MentionedUserIds | []string | No | List of user IDs mentioned in the activity |
| PollID | string | No | Poll ID |
| RestrictReplies | string | No | Controls who can add comments/replies to this activity. One of: everyone, people_i_follow, nobody |
| RunActivityProcessors | bool | No | If true, runs activity processors on the updated activity. Processors will only run if the activi... |
| SearchData | map[string]any | No | Additional data for search indexing |
| SkipEnrichURL | bool | No | Whether to skip URL enrichment for the activity |
| Text | string | No | The text content of the activity |
| User | UserRequest | No | - |
| UserID | string | No | - |
| Visibility | string | No | Visibility setting for the activity |
| VisibilityTag | string | No | If visibility is 'tag', this is the tag name and is required |
UpdateActivityPartial
Modify selected fields of an activity to make incremental changes without altering the entire activity. Use this for efficient updates when only specific attributes need adjustment.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Partial activity update
resp, err := feedsClient.UpdateActivityPartial(context.Background(), &stream.UpdateActivityPartialRequest{
ID: "activity-123",
UserID: stream.PtrTo("john"),
EnrichOwnFields: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with force_moderation and handle_mention_notifications
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Partial activity update
resp, err := feedsClient.UpdateActivityPartial(context.Background(), &stream.UpdateActivityPartialRequest{
ID: "activity-123",
ForceModeration: stream.PtrTo(false),
HandleMentionNotifications: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with run_activity_processors and set
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Partial activity update
resp, err := feedsClient.UpdateActivityPartial(context.Background(), &stream.UpdateActivityPartialRequest{
ID: "activity-123",
RunActivityProcessors: stream.PtrTo(false),
Set: map[string]any{},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with unset and user
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Partial activity update
resp, err := feedsClient.UpdateActivityPartial(context.Background(), &stream.UpdateActivityPartialRequest{
ID: "activity-123",
Unset: nil,
User: &stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UpdateActivityPartialResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
| CopyCustomToNotification | bool | No | Whether to copy custom data to the notification activity (only applies when handle_mention_notifi... |
| EnrichOwnFields | bool | No | If true, enriches the activity's current_feed with own_* fields (own_follows, own_followings, own... |
| ForceModeration | bool | No | If true, forces moderation to run for server-side requests. By default, server-side requests skip... |
| HandleMentionNotifications | bool | No | If true, creates notification activities for newly mentioned users and deletes notifications for ... |
| RunActivityProcessors | bool | No | If true, runs activity processors on the updated activity. Processors will only run if the activi... |
| Set | map[string]any | No | Map of field names to new values. Supported fields: 'text', 'attachments', 'custom', 'visibility'... |
| Unset | []string | No | List of field names to remove. Supported fields: 'custom', 'visibility_tag', 'location', 'expires... |
| User | UserRequest | No | - |
| UserID | string | No | - |
DeleteActivity
Remove a specific activity from the feed to maintain relevance or manage content lifecycle. Use this when an activity is no longer needed or should not be displayed.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Delete a single activity
resp, err := feedsClient.DeleteActivity(context.Background(), &stream.DeleteActivityRequest{
ID: "activity-123",
HardDelete: stream.PtrTo(false),
DeleteNotificationActivity: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: DeleteActivityResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
| HardDelete | bool | No | - |
| DeleteNotificationActivity | bool | No | - |
RestoreActivity
Restore a previously soft-deleted activity to make it active again, useful for recovering activities that were unintentionally removed or need to be reinstated.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Restore a soft-deleted activity
resp, err := feedsClient.RestoreActivity(context.Background(), &stream.RestoreActivityRequest{
ID: "activity-123",
UserID: stream.PtrTo("john"),
User: &stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with enrich_own_fields
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Restore a soft-deleted activity
resp, err := feedsClient.RestoreActivity(context.Background(), &stream.RestoreActivityRequest{
ID: "activity-123",
EnrichOwnFields: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: RestoreActivityResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
| EnrichOwnFields | bool | No | - |
| User | UserRequest | No | - |
| UserID | string | No | - |
QueryBookmarkFolders
Retrieve a list of bookmark folders to organize and access saved activities quickly. Use this to manage user bookmarks and improve content retrieval efficiency.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query bookmark folders
resp, err := feedsClient.QueryBookmarkFolders(context.Background(), &stream.QueryBookmarkFoldersRequest{
Limit: stream.PtrTo(25),
Filter: map[string]any{},
Sort: []stream.SortParamRequest{{Direction: stream.PtrTo(-1), Field: stream.PtrTo("created_at"), Type: stream.PtrTo("like")}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with prev and next
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query bookmark folders
resp, err := feedsClient.QueryBookmarkFolders(context.Background(), &stream.QueryBookmarkFoldersRequest{
Prev: nil,
Next: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: QueryBookmarkFoldersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Filter | map[string]any | No | Filters to apply to the query |
| Limit | int | No | - |
| Next | string | No | - |
| Prev | string | No | - |
| Sort | []SortParamRequest | No | Sorting parameters for the query |
UpdateBookmarkFolder
Modify the details of a bookmark folder to reorganize or rename it for better management. Use this when you need to update folder attributes for improved user experience.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update a bookmark folder
resp, err := feedsClient.UpdateBookmarkFolder(context.Background(), &stream.UpdateBookmarkFolderRequest{
FolderID: "folder-123",
UserID: stream.PtrTo("john"),
Name: stream.PtrTo("My Feed"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with user and custom
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update a bookmark folder
resp, err := feedsClient.UpdateBookmarkFolder(context.Background(), &stream.UpdateBookmarkFolderRequest{
FolderID: "folder-123",
User: &stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
Custom: map[string]any{},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UpdateBookmarkFolderResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| FolderID | string | Yes | - |
| Custom | map[string]any | No | Custom data for the folder |
| Name | string | No | Name of the folder |
| User | UserRequest | No | - |
| UserID | string | No | - |
DeleteBookmarkFolder
Remove a bookmark folder to declutter or reorganize saved content. Use this when a folder is no longer needed or should be consolidated with others.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Delete a bookmark folder
resp, err := feedsClient.DeleteBookmarkFolder(context.Background(), &stream.DeleteBookmarkFolderRequest{
FolderID: "folder-123",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: DeleteBookmarkFolderResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| FolderID | string | Yes | - |
QueryBookmarks
Retrieve a list of bookmarks based on specified criteria, useful for accessing saved or frequently accessed items quickly.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query bookmarks
resp, err := feedsClient.QueryBookmarks(context.Background(), &stream.QueryBookmarksRequest{
Limit: stream.PtrTo(25),
Filter: map[string]any{},
Sort: []stream.SortParamRequest{{Direction: stream.PtrTo(-1), Field: stream.PtrTo("created_at"), Type: stream.PtrTo("like")}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with next and prev
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query bookmarks
resp, err := feedsClient.QueryBookmarks(context.Background(), &stream.QueryBookmarksRequest{
Next: nil,
Prev: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with enrich_own_fields
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query bookmarks
resp, err := feedsClient.QueryBookmarks(context.Background(), &stream.QueryBookmarksRequest{
EnrichOwnFields: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: QueryBookmarksResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| EnrichOwnFields | bool | No | - |
| Filter | map[string]any | No | Filters to apply to the query |
| Limit | int | No | - |
| Next | string | No | - |
| Prev | string | No | - |
| Sort | []SortParamRequest | No | Sorting parameters for the query |
ReadCollections
Fetch details of existing collections, enabling users to view and manage grouped data easily.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Read collections
resp, err := feedsClient.ReadCollections(context.Background(), &stream.ReadCollectionsRequest{
UserID: stream.PtrTo("john"),
CollectionRefs: []string{"food:pizza-123"},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: ReadCollectionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| CollectionRefs | []string | No | - |
| UserID | string | No | - |
CreateCollections
Create new collections in bulk, ideal for organizing large sets of data into manageable groups at once.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Create multiple collections
resp, err := feedsClient.CreateCollections(context.Background(), &stream.CreateCollectionsRequest{
Collections: []stream.CollectionRequest{{Name: "My Feed", ID: stream.PtrTo("activity-123"), UserID: stream.PtrTo("john")}},
UserID: stream.PtrTo("john"),
User: &stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: CreateCollectionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Collections | []CollectionRequest | Yes | List of collections to create |
| User | UserRequest | No | - |
| UserID | string | No | - |
UpsertCollections
Insert new collections or update existing ones in a single operation, ensuring your data is current without multiple requests.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Upsert multiple collections
resp, err := feedsClient.UpsertCollections(context.Background(), &stream.UpsertCollectionsRequest{
Collections: []stream.CollectionRequest{{Name: "My Feed", ID: stream.PtrTo("activity-123"), UserID: stream.PtrTo("john")}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UpsertCollectionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Collections | []CollectionRequest | Yes | List of collections to upsert (insert if new, update if existing) |
UpdateCollections
Modify existing collections by changing their attributes, facilitating the maintenance and customization of grouped data.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update multiple collections
resp, err := feedsClient.UpdateCollections(context.Background(), &stream.UpdateCollectionsRequest{
Collections: []stream.UpdateCollectionRequest{{ID: "activity-123", Name: "My Feed"}},
UserID: stream.PtrTo("john"),
User: &stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UpdateCollectionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Collections | []UpdateCollectionRequest | Yes | List of collections to update (only custom data is updatable) |
| User | UserRequest | No | - |
| UserID | string | No | - |
DeleteCollections
Remove multiple collections at once, useful for cleaning up and organizing data by eliminating unneeded sets.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Delete multiple collections
resp, err := feedsClient.DeleteCollections(context.Background(), &stream.DeleteCollectionsRequest{
CollectionRefs: []string{"food:pizza-123"},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: DeleteCollectionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| CollectionRefs | []string | Yes | - |
QueryCollections
Retrieves data from specified collections, allowing you to access and filter stored information efficiently. Use this when you need to extract specific data from your collections for analysis or display.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query collections
resp, err := feedsClient.QueryCollections(context.Background(), &stream.QueryCollectionsRequest{
UserID: stream.PtrTo("john"),
Limit: stream.PtrTo(25),
Filter: map[string]any{},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with sort and next
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query collections
resp, err := feedsClient.QueryCollections(context.Background(), &stream.QueryCollectionsRequest{
Sort: []stream.SortParamRequest{{Direction: stream.PtrTo(-1), Field: stream.PtrTo("created_at"), Type: stream.PtrTo("like")}},
Next: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with user and prev
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query collections
resp, err := feedsClient.QueryCollections(context.Background(), &stream.QueryCollectionsRequest{
User: &stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
Prev: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: QueryCollectionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Filter | map[string]any | No | Filters to apply to the query |
| Limit | int | No | - |
| Next | string | No | - |
| Prev | string | No | - |
| Sort | []SortParamRequest | No | Sorting parameters for the query |
| User | UserRequest | No | - |
| UserID | string | No | - |
GetComments
Retrieve comments related to a specific object, providing insights and feedback from users or collaborators.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Get comments for an object
resp, err := feedsClient.GetComments(context.Background(), &stream.GetCommentsRequest{
ObjectID: "activity-123",
ObjectType: "activity",
UserID: stream.PtrTo("john"),
Limit: stream.PtrTo(25),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with sort and id_around
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Get comments for an object
resp, err := feedsClient.GetComments(context.Background(), &stream.GetCommentsRequest{
ObjectID: "activity-123",
ObjectType: "activity",
Sort: []stream.SortParamRequest{{Field: stream.PtrTo("created_at"), Direction: stream.PtrTo(-1)}},
IDAround: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with depth and replies_limit
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Get comments for an object
resp, err := feedsClient.GetComments(context.Background(), &stream.GetCommentsRequest{
ObjectID: "activity-123",
ObjectType: "activity",
Depth: stream.PtrTo(2),
RepliesLimit: stream.PtrTo(10),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with prev and next
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Get comments for an object
resp, err := feedsClient.GetComments(context.Background(), &stream.GetCommentsRequest{
ObjectID: "activity-123",
ObjectType: "activity",
Prev: nil,
Next: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: GetCommentsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ObjectID | string | Yes | - |
| ObjectType | string | Yes | - |
| Depth | int | No | - |
| Sort | string | No | - |
| RepliesLimit | int | No | - |
| IDAround | string | No | - |
| UserID | string | No | - |
| Limit | int | No | - |
| Prev | string | No | - |
| Next | string | No | - |
AddComment
Post a new comment or reply to an existing one, fostering interaction and discussion around a particular object.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Add a comment or reply
resp, err := feedsClient.AddComment(context.Background(), &stream.AddCommentRequest{
UserID: stream.PtrTo("john"),
ID: stream.PtrTo("activity-123"),
SkipPush: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with create_notification_activity and custom
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Add a comment or reply
resp, err := feedsClient.AddComment(context.Background(), &stream.AddCommentRequest{
CreateNotificationActivity: stream.PtrTo(false),
Custom: map[string]any{},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with force_moderation and attachments
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Add a comment or reply
resp, err := feedsClient.AddComment(context.Background(), &stream.AddCommentRequest{
ForceModeration: stream.PtrTo(false),
Attachments: []stream.Attachment{{Text: stream.PtrTo("Hello, world!"), Type: stream.PtrTo("like")}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with mentioned_user_ids and object_id
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Add a comment or reply
resp, err := feedsClient.AddComment(context.Background(), &stream.AddCommentRequest{
MentionedUserIds: []string{"user-1", "user-2"},
ObjectID: stream.PtrTo("activity-123"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: AddCommentResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Attachments | []Attachment | No | Media attachments for the reply |
| Comment | string | No | Text content of the comment |
| CopyCustomToNotification | bool | No | Whether to copy custom data to the notification activity (only applies when create_notification_a... |
| CreateNotificationActivity | bool | No | Whether to create a notification activity for this comment |
| Custom | map[string]any | No | Custom data for the comment |
| ForceModeration | bool | No | If true, forces moderation to run for server-side requests. By default, server-side requests skip... |
| ID | string | No | Optional custom ID for the comment (max 255 characters). If not provided, a UUID will be generated. |
| MentionedUserIds | []string | No | List of users mentioned in the reply |
| ObjectID | string | No | ID of the object to comment on. Required for root comments |
| ObjectType | string | No | Type of the object to comment on. Required for root comments |
| ParentID | string | No | ID of parent comment for replies. When provided, object_id and object_type are automatically inhe... |
| SkipEnrichURL | bool | No | Whether to skip URL enrichment for this comment |
| SkipPush | bool | No | - |
| User | UserRequest | No | - |
| UserID | string | No | - |
AddCommentsBatch
Submit multiple comments in a single request, streamlining processes where multiple inputs are needed simultaneously.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Add multiple comments in a batch
resp, err := feedsClient.AddCommentsBatch(context.Background(), &stream.AddCommentsBatchRequest{
Comments: []stream.AddCommentRequest{{Comment: stream.PtrTo("Great post!"), ID: stream.PtrTo("activity-123"), ObjectID: stream.PtrTo("activity-123"), ObjectType: stream.PtrTo("activity"), ParentID: stream.PtrTo("parent-123"), SkipPush: stream.PtrTo(false), UserID: stream.PtrTo("john")}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: AddCommentsBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Comments | []AddCommentRequest | Yes | List of comments to add |
QueryComments
Search for comments based on defined parameters, allowing users to filter and locate specific discussions efficiently.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query comments
resp, err := feedsClient.QueryComments(context.Background(), &stream.QueryCommentsRequest{
Filter: map[string]any{},
UserID: stream.PtrTo("john"),
Limit: stream.PtrTo(25),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with sort and prev
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query comments
resp, err := feedsClient.QueryComments(context.Background(), &stream.QueryCommentsRequest{
Filter: map[string]any{},
Sort: []stream.SortParamRequest{{Field: stream.PtrTo("created_at"), Direction: stream.PtrTo(-1)}},
Prev: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with id_around and user
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query comments
resp, err := feedsClient.QueryComments(context.Background(), &stream.QueryCommentsRequest{
Filter: map[string]any{},
IDAround: stream.PtrTo("value"),
User: &stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with next
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query comments
resp, err := feedsClient.QueryComments(context.Background(), &stream.QueryCommentsRequest{
Filter: map[string]any{},
Next: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: QueryCommentsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Filter | map[string]any | Yes | Filter to apply to the query |
| IDAround | string | No | Returns the comment with the specified ID along with surrounding comments for context |
| Limit | int | No | Maximum number of comments to return |
| Next | string | No | - |
| Prev | string | No | - |
| Sort | string | No | Array of sort parameters |
| User | UserRequest | No | - |
| UserID | string | No | - |
AddCommentBookmark
Allows users to bookmark a comment for easy future reference. Use this to enable users to save important comments for quick access later.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Add comment bookmark
resp, err := feedsClient.AddCommentBookmark(context.Background(), &stream.AddCommentBookmarkRequest{
CommentID: "comment-123",
UserID: stream.PtrTo("john"),
FolderID: stream.PtrTo("folder-123"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with new_folder and user
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Add comment bookmark
resp, err := feedsClient.AddCommentBookmark(context.Background(), &stream.AddCommentBookmarkRequest{
CommentID: "comment-123",
NewFolder: &stream.AddFolderRequest{Name: "My Feed", Custom: map[string]any{}},
User: &stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with custom
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Add comment bookmark
resp, err := feedsClient.AddCommentBookmark(context.Background(), &stream.AddCommentBookmarkRequest{
CommentID: "comment-123",
Custom: map[string]any{},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: AddCommentBookmarkResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| CommentID | string | Yes | - |
| Custom | map[string]any | No | Custom data for the bookmark |
| FolderID | string | No | ID of the folder to add the bookmark to |
| NewFolder | AddFolderRequest | No | Create a new folder for this bookmark |
| User | UserRequest | No | - |
| UserID | string | No | - |
UpdateCommentBookmark
Modifies an existing comment bookmark to reflect changes or updates. Use this to ensure that user bookmarks remain relevant and up-to-date.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update comment bookmark
resp, err := feedsClient.UpdateCommentBookmark(context.Background(), &stream.UpdateCommentBookmarkRequest{
CommentID: "comment-123",
UserID: stream.PtrTo("john"),
FolderID: stream.PtrTo("folder-123"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with new_folder and new_folder_id
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update comment bookmark
resp, err := feedsClient.UpdateCommentBookmark(context.Background(), &stream.UpdateCommentBookmarkRequest{
CommentID: "comment-123",
NewFolder: &stream.AddFolderRequest{Name: "My Feed", Custom: map[string]any{}},
NewFolderID: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with user and custom
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update comment bookmark
resp, err := feedsClient.UpdateCommentBookmark(context.Background(), &stream.UpdateCommentBookmarkRequest{
CommentID: "comment-123",
User: &stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
Custom: map[string]any{},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UpdateCommentBookmarkResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| CommentID | string | Yes | - |
| Custom | map[string]any | No | Custom data for the bookmark |
| FolderID | string | No | ID of the folder containing the bookmark |
| NewFolder | AddFolderRequest | No | Create a new folder and move the bookmark into it |
| NewFolderID | string | No | Move the bookmark to this folder (empty string removes the folder) |
| User | UserRequest | No | - |
| UserID | string | No | - |
DeleteCommentBookmark
Removes a bookmarked comment, freeing up space and reducing clutter. Use this when a bookmarked comment is no longer needed by the user.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Delete a comment bookmark
resp, err := feedsClient.DeleteCommentBookmark(context.Background(), &stream.DeleteCommentBookmarkRequest{
CommentID: "comment-123",
UserID: stream.PtrTo("john"),
FolderID: stream.PtrTo("folder-123"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: DeleteCommentBookmarkResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| CommentID | string | Yes | - |
| FolderID | string | No | - |
| UserID | string | No | - |
GetComment
Retrieve a specific comment by its ID to view details or perform further operations. Use this method when you need to access the content or metadata of a particular comment.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Get comment
resp, err := feedsClient.GetComment(context.Background(), &stream.GetCommentRequest{
ID: "activity-123",
UserID: stream.PtrTo("john"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: GetCommentResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
| UserID | string | No | - |
UpdateComment
Modify the content or metadata of an existing comment. Use this method when you want to edit a comment's text or update its properties.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update a comment
resp, err := feedsClient.UpdateComment(context.Background(), &stream.UpdateCommentRequest{
ID: "activity-123",
UserID: stream.PtrTo("john"),
SkipPush: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with copy_custom_to_notification and custom
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update a comment
resp, err := feedsClient.UpdateComment(context.Background(), &stream.UpdateCommentRequest{
ID: "activity-123",
CopyCustomToNotification: stream.PtrTo(false),
Custom: map[string]any{},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with force_moderation and handle_mention_notifications
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update a comment
resp, err := feedsClient.UpdateComment(context.Background(), &stream.UpdateCommentRequest{
ID: "activity-123",
ForceModeration: stream.PtrTo(false),
HandleMentionNotifications: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with mentioned_user_ids and skip_enrich_url
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update a comment
resp, err := feedsClient.UpdateComment(context.Background(), &stream.UpdateCommentRequest{
ID: "activity-123",
MentionedUserIds: []string{"user-1", "user-2"},
SkipEnrichURL: false,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UpdateCommentResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
| Attachments | []Attachment | No | Updated media attachments for the comment. Providing this field will replace all existing attachm... |
| Comment | string | No | Updated text content of the comment |
| CopyCustomToNotification | bool | No | Whether to copy custom data to the notification activity (only applies when handle_mention_notifi... |
| Custom | map[string]any | No | Updated custom data for the comment |
| ForceModeration | bool | No | If true, forces moderation to run for server-side requests. By default, server-side requests skip... |
| HandleMentionNotifications | bool | No | If true, creates notification activities for newly mentioned users and deletes notifications for ... |
| MentionedUserIds | []string | No | List of user IDs mentioned in the comment |
| SkipEnrichURL | bool | No | Whether to skip URL enrichment for this comment |
| SkipPush | bool | No | - |
| User | UserRequest | No | - |
| UserID | string | No | - |
DeleteComment
Remove a comment from a feed. Use this method to permanently delete a comment when it is no longer needed.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Delete a comment
resp, err := feedsClient.DeleteComment(context.Background(), &stream.DeleteCommentRequest{
ID: "activity-123",
HardDelete: stream.PtrTo(false),
DeleteNotificationActivity: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: DeleteCommentResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
| HardDelete | bool | No | - |
| DeleteNotificationActivity | bool | No | - |
UpdateCommentPartial
Applies partial updates to a comment, allowing for specific fields to be modified without altering the entire comment. Use this to efficiently update comment content or metadata.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Partial comment update
resp, err := feedsClient.UpdateCommentPartial(context.Background(), &stream.UpdateCommentPartialRequest{
ID: "activity-123",
UserID: stream.PtrTo("john"),
SkipPush: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with handle_mention_notifications and set
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Partial comment update
resp, err := feedsClient.UpdateCommentPartial(context.Background(), &stream.UpdateCommentPartialRequest{
ID: "activity-123",
HandleMentionNotifications: stream.PtrTo(false),
Set: map[string]any{},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with skip_enrich_url and copy_custom_to_notification
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Partial comment update
resp, err := feedsClient.UpdateCommentPartial(context.Background(), &stream.UpdateCommentPartialRequest{
ID: "activity-123",
SkipEnrichURL: false,
CopyCustomToNotification: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with unset and user
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Partial comment update
resp, err := feedsClient.UpdateCommentPartial(context.Background(), &stream.UpdateCommentPartialRequest{
ID: "activity-123",
Unset: nil,
User: &stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UpdateCommentPartialResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
| CopyCustomToNotification | bool | No | Whether to copy custom data to notification activities Deprecated: use notification_context.trigg... |
| ForceModeration | bool | No | If true, forces moderation to run for server-side requests. By default, server-side requests skip... |
| HandleMentionNotifications | bool | No | Whether to handle mention notification changes |
| Set | map[string]any | No | Map of field names to new values. Supported fields: 'text', 'attachments', 'custom', 'mentioned_u... |
| SkipEnrichURL | bool | No | Whether to skip URL enrichment |
| SkipPush | bool | No | Whether to skip push notifications |
| Unset | []string | No | List of field names to remove. Supported fields: 'custom', 'attachments', 'mentioned_user_ids', '... |
| User | UserRequest | No | - |
| UserID | string | No | - |
AddCommentReaction
Attach a reaction, such as a like or emoji, to a comment. Use this method to allow users to express their sentiments about a comment.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Add comment reaction
resp, err := feedsClient.AddCommentReaction(context.Background(), &stream.AddCommentReactionRequest{
ID: "activity-123",
Type: "like",
UserID: stream.PtrTo("john"),
SkipPush: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with custom and enforce_unique
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Add comment reaction
resp, err := feedsClient.AddCommentReaction(context.Background(), &stream.AddCommentReactionRequest{
ID: "activity-123",
Type: "like",
Custom: map[string]any{},
EnforceUnique: stream.PtrTo(true),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with copy_custom_to_notification and user
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Add comment reaction
resp, err := feedsClient.AddCommentReaction(context.Background(), &stream.AddCommentReactionRequest{
ID: "activity-123",
Type: "like",
CopyCustomToNotification: stream.PtrTo(false),
User: &stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with create_notification_activity
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Add comment reaction
resp, err := feedsClient.AddCommentReaction(context.Background(), &stream.AddCommentReactionRequest{
ID: "activity-123",
Type: "like",
CreateNotificationActivity: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: AddCommentReactionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
| Type | string | Yes | The type of reaction, eg upvote, like, ... |
| CopyCustomToNotification | bool | No | Whether to copy custom data to the notification activity (only applies when create_notification_a... |
| CreateNotificationActivity | bool | No | Whether to create a notification activity for this reaction |
| Custom | map[string]any | No | Optional custom data to add to the reaction |
| EnforceUnique | bool | No | Whether to enforce unique reactions per user (remove other reaction types from the user when addi... |
| SkipPush | bool | No | - |
| User | UserRequest | No | - |
| UserID | string | No | - |
QueryCommentReactions
Retrieve all reactions associated with a specific comment. Use this method to view how users have interacted with a comment through various reactions.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query comment reactions
resp, err := feedsClient.QueryCommentReactions(context.Background(), &stream.QueryCommentReactionsRequest{
ID: "activity-123",
Limit: stream.PtrTo(25),
Filter: map[string]any{},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with sort and prev
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query comment reactions
resp, err := feedsClient.QueryCommentReactions(context.Background(), &stream.QueryCommentReactionsRequest{
ID: "activity-123",
Sort: []stream.SortParamRequest{{Direction: stream.PtrTo(-1), Field: stream.PtrTo("created_at"), Type: stream.PtrTo("like")}},
Prev: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with next
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query comment reactions
resp, err := feedsClient.QueryCommentReactions(context.Background(), &stream.QueryCommentReactionsRequest{
ID: "activity-123",
Next: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: QueryCommentReactionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
| Filter | map[string]any | No | - |
| Limit | int | No | - |
| Next | string | No | - |
| Prev | string | No | - |
| Sort | []SortParamRequest | No | - |
DeleteCommentReaction
Remove a specific reaction from a comment. Use this method when you need to retract or correct a reaction added to a comment.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Delete comment reaction
resp, err := feedsClient.DeleteCommentReaction(context.Background(), &stream.DeleteCommentReactionRequest{
ID: "activity-123",
Type: "like",
UserID: stream.PtrTo("john"),
DeleteNotificationActivity: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: DeleteCommentReactionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
| Type | string | Yes | - |
| DeleteNotificationActivity | bool | No | - |
| UserID | string | No | - |
GetCommentReplies
Fetch all replies associated with a specific comment. Use this method to view or manage the conversation thread stemming from a comment.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Get replies for a comment
resp, err := feedsClient.GetCommentReplies(context.Background(), &stream.GetCommentRepliesRequest{
ID: "activity-123",
UserID: stream.PtrTo("john"),
Limit: stream.PtrTo(25),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with sort and id_around
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Get replies for a comment
resp, err := feedsClient.GetCommentReplies(context.Background(), &stream.GetCommentRepliesRequest{
ID: "activity-123",
Sort: []stream.SortParamRequest{{Field: stream.PtrTo("created_at"), Direction: stream.PtrTo(-1)}},
IDAround: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with depth and replies_limit
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Get replies for a comment
resp, err := feedsClient.GetCommentReplies(context.Background(), &stream.GetCommentRepliesRequest{
ID: "activity-123",
Depth: stream.PtrTo(2),
RepliesLimit: stream.PtrTo(10),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with prev and next
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Get replies for a comment
resp, err := feedsClient.GetCommentReplies(context.Background(), &stream.GetCommentRepliesRequest{
ID: "activity-123",
Prev: nil,
Next: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: GetCommentRepliesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
| Depth | int | No | - |
| Sort | string | No | - |
| RepliesLimit | int | No | - |
| IDAround | string | No | - |
| UserID | string | No | - |
| Limit | int | No | - |
| Prev | string | No | - |
| Next | string | No | - |
RestoreComment
Reactivates a comment that was previously soft-deleted, making it visible again. Use this to recover comments that were mistakenly deleted or need to be reinstated.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Restore a soft-deleted comment
resp, err := feedsClient.RestoreComment(context.Background(), &stream.RestoreCommentRequest{
ID: "activity-123",
UserID: stream.PtrTo("john"),
User: &stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: RestoreCommentResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
| User | UserRequest | No | - |
| UserID | string | No | - |
ListFeedGroups
Retrieve a list of all available feed groups within the application. Use this method to explore or manage different categories of feeds.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// List all feed groups
resp, err := feedsClient.ListFeedGroups(context.Background(), &stream.ListFeedGroupsRequest{
IncludeSoftDeleted: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: ListFeedGroupsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| IncludeSoftDeleted | bool | No | - |
CreateFeedGroup
Establish a new feed group to categorize and organize related feeds. Use this method when you need to create a new grouping for feeds based on specific criteria or topics.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Create a new feed group
resp, err := feedsClient.CreateFeedGroup(context.Background(), &stream.CreateFeedGroupRequest{
ID: "activity-123",
ActivityProcessors: []stream.ActivityProcessorConfig{{Type: "like"}},
ActivitySelectors: []stream.ActivitySelectorConfig{{Type: "like"}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with aggregation and custom
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Create a new feed group
resp, err := feedsClient.CreateFeedGroup(context.Background(), &stream.CreateFeedGroupRequest{
ID: "activity-123",
Aggregation: &stream.AggregationConfig{ActivitiesSort: "value"},
Custom: map[string]any{},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with default_visibility and notification
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Create a new feed group
resp, err := feedsClient.CreateFeedGroup(context.Background(), &stream.CreateFeedGroupRequest{
ID: "activity-123",
DefaultVisibility: stream.PtrTo("value"),
Notification: &stream.NotificationConfig{DeduplicationWindow: "value"},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with push_notification and ranking
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Create a new feed group
resp, err := feedsClient.CreateFeedGroup(context.Background(), &stream.CreateFeedGroupRequest{
ID: "activity-123",
PushNotification: &stream.PushNotificationConfig{EnablePush: false},
Ranking: &stream.RankingConfig{Type: "like", Defaults: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: CreateFeedGroupResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | Unique identifier for the feed group |
| ActivityProcessors | []ActivityProcessorConfig | No | Configuration for activity processors |
| ActivitySelectors | []ActivitySelectorConfig | No | Configuration for activity selectors |
| Aggregation | AggregationConfig | No | Configuration for activity aggregation |
| Custom | map[string]any | No | Custom data for the feed group |
| DefaultVisibility | string | No | Default visibility for the feed group, can be 'public', 'visible', 'followers', 'members', or 'pr... |
| Notification | NotificationConfig | No | Configuration for notifications |
| PushNotification | PushNotificationConfig | No | - |
| Ranking | RankingConfig | No | Configuration for activity ranking |
| Stories | StoriesConfig | No | Configuration for stories functionality |
GetOrCreateFeed
Retrieve an existing feed or create a new one if it doesn't exist. Use this method to ensure a feed is available for content posting or interaction.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Create a new feed
resp, err := feedsClient.GetOrCreateFeed(context.Background(), &stream.GetOrCreateFeedRequest{
FeedGroupID: "user",
FeedID: "john",
UserID: stream.PtrTo("john"),
Limit: stream.PtrTo(25),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with filter and data
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Create a new feed
resp, err := feedsClient.GetOrCreateFeed(context.Background(), &stream.GetOrCreateFeedRequest{
FeedGroupID: "user",
FeedID: "john",
Filter: map[string]any{},
Data: &stream.FeedInput{Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with followers_pagination and following_pagination
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Create a new feed
resp, err := feedsClient.GetOrCreateFeed(context.Background(), &stream.GetOrCreateFeedRequest{
FeedGroupID: "user",
FeedID: "john",
FollowersPagination: &stream.PagerRequest{Limit: 25},
FollowingPagination: &stream.PagerRequest{Limit: 25},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with friend_reactions_options and id_around
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Create a new feed
resp, err := feedsClient.GetOrCreateFeed(context.Background(), &stream.GetOrCreateFeedRequest{
FeedGroupID: "user",
FeedID: "john",
FriendReactionsOptions: &stream.FriendReactionsOptions{Enabled: false},
IDAround: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: GetOrCreateFeedResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| FeedGroupID | string | Yes | - |
| FeedID | string | Yes | - |
| Data | FeedInput | No | - |
| EnrichmentOptions | EnrichmentOptions | No | - |
| ExternalRanking | map[string]any | No | - |
| Filter | map[string]any | No | - |
| FollowersPagination | PagerRequest | No | - |
| FollowingPagination | PagerRequest | No | - |
| FriendReactionsOptions | FriendReactionsOptions | No | - |
| IDAround | string | No | - |
| InterestWeights | map[string]any | No | - |
| Limit | int | No | - |
| MemberPagination | PagerRequest | No | - |
| Next | string | No | - |
| Prev | string | No | - |
| User | UserRequest | No | - |
| UserID | string | No | - |
| View | string | No | - |
| Watch | bool | No | - |
UpdateFeed
Modify the details or settings of an existing feed to keep it current and relevant. Use this method when you want to change aspects like feed name, description, or settings.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update a feed
resp, err := feedsClient.UpdateFeed(context.Background(), &stream.UpdateFeedRequest{
FeedGroupID: "user",
FeedID: "john",
Name: stream.PtrTo("My Feed"),
CreatedByID: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with custom and description
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update a feed
resp, err := feedsClient.UpdateFeed(context.Background(), &stream.UpdateFeedRequest{
FeedGroupID: "user",
FeedID: "john",
Custom: map[string]any{},
Description: stream.PtrTo("A description"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with enrich_own_fields and filter_tags
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update a feed
resp, err := feedsClient.UpdateFeed(context.Background(), &stream.UpdateFeedRequest{
FeedGroupID: "user",
FeedID: "john",
EnrichOwnFields: stream.PtrTo(false),
FilterTags: []string{"tag1", "tag2"},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with location and clear_location
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update a feed
resp, err := feedsClient.UpdateFeed(context.Background(), &stream.UpdateFeedRequest{
FeedGroupID: "user",
FeedID: "john",
Location: &stream.Location{Lat: 10, Lng: 10},
ClearLocation: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UpdateFeedResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| FeedGroupID | string | Yes | - |
| FeedID | string | Yes | - |
| ClearLocation | bool | No | If true, removes the geographic location from the feed |
| CreatedByID | string | No | ID of the new feed creator (owner) |
| Custom | map[string]any | No | Custom data for the feed |
| Description | string | No | Description of the feed |
| EnrichOwnFields | bool | No | If true, enriches the feed with own_* fields (own_follows, own_followings, own_capabilities, own_... |
| FilterTags | []string | No | Tags used for filtering feeds |
| Location | Location | No | Geographic location for the feed |
| Name | string | No | Name of the feed |
DeleteFeed
Remove a specific feed permanently to clean up unused or obsolete data. This is useful when a feed is no longer needed and should be completely erased from your system.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Delete a single feed
resp, err := feedsClient.DeleteFeed(context.Background(), &stream.DeleteFeedRequest{
FeedGroupID: "user",
FeedID: "john",
HardDelete: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: DeleteFeedResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| FeedGroupID | string | Yes | - |
| FeedID | string | Yes | - |
| HardDelete | bool | No | - |
MarkActivity
Designate specific activities as read, seen, or watched to help users track their interactions and stay informed about new content. Use it to manage activity notifications and ensure users only see what is relevant to them.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Mark activities as read/seen/watched
resp, err := feedsClient.MarkActivity(context.Background(), &stream.MarkActivityRequest{
FeedGroupID: "user",
FeedID: "john",
UserID: stream.PtrTo("john"),
MarkAllSeen: stream.PtrTo(true),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with mark_read and mark_seen
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Mark activities as read/seen/watched
resp, err := feedsClient.MarkActivity(context.Background(), &stream.MarkActivityRequest{
FeedGroupID: "user",
FeedID: "john",
MarkRead: nil,
MarkSeen: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with mark_watched and user
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Mark activities as read/seen/watched
resp, err := feedsClient.MarkActivity(context.Background(), &stream.MarkActivityRequest{
FeedGroupID: "user",
FeedID: "john",
MarkWatched: nil,
User: &stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with mark_all_read
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Mark activities as read/seen/watched
resp, err := feedsClient.MarkActivity(context.Background(), &stream.MarkActivityRequest{
FeedGroupID: "user",
FeedID: "john",
MarkAllRead: stream.PtrTo(true),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| FeedGroupID | string | Yes | - |
| FeedID | string | Yes | - |
| MarkAllRead | bool | No | Whether to mark all activities as read |
| MarkAllSeen | bool | No | Whether to mark all activities as seen |
| MarkRead | []string | No | List of activity IDs to mark as read |
| MarkSeen | []string | No | List of activity IDs to mark as seen |
| MarkWatched | []string | No | List of activity IDs to mark as watched (for stories) |
| User | UserRequest | No | - |
| UserID | string | No | - |
PinActivity
Highlight or prioritize an activity by pinning it to the top of a feed, ensuring it remains visible and easily accessible. This is useful for emphasizing important updates or content.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Pin an activity to a feed
resp, err := feedsClient.PinActivity(context.Background(), &stream.PinActivityRequest{
FeedGroupID: "user",
FeedID: "john",
ActivityID: "activity-123",
UserID: stream.PtrTo("john"),
User: &stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with enrich_own_fields
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Pin an activity to a feed
resp, err := feedsClient.PinActivity(context.Background(), &stream.PinActivityRequest{
FeedGroupID: "user",
FeedID: "john",
ActivityID: "activity-123",
EnrichOwnFields: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: PinActivityResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| FeedGroupID | string | Yes | - |
| FeedID | string | Yes | - |
| ActivityID | string | Yes | - |
| EnrichOwnFields | bool | No | If true, enriches the activity's current_feed with own_* fields (own_follows, own_followings, own... |
| User | UserRequest | No | - |
| UserID | string | No | - |
UnpinActivity
Remove a pinned activity from its prioritized position, allowing it to move naturally within the feed. Use this method when the activity no longer needs special emphasis.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Unpin an activity from a feed
resp, err := feedsClient.UnpinActivity(context.Background(), &stream.UnpinActivityRequest{
FeedGroupID: "user",
FeedID: "john",
ActivityID: "activity-123",
UserID: stream.PtrTo("john"),
EnrichOwnFields: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UnpinActivityResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| FeedGroupID | string | Yes | - |
| FeedID | string | Yes | - |
| ActivityID | string | Yes | - |
| EnrichOwnFields | bool | No | - |
| UserID | string | No | - |
UpdateFeedMembers
Modify the list of members associated with a feed, adding or removing individuals as necessary. This method is beneficial for managing access and collaboration within a feed.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update feed members
resp, err := feedsClient.UpdateFeedMembers(context.Background(), &stream.UpdateFeedMembersRequest{
FeedGroupID: "user",
FeedID: "john",
Operation: "add",
Limit: stream.PtrTo(25),
Members: []stream.FeedMemberRequest{{UserID: "john", Role: stream.PtrTo("member")}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with next and prev
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update feed members
resp, err := feedsClient.UpdateFeedMembers(context.Background(), &stream.UpdateFeedMembersRequest{
FeedGroupID: "user",
FeedID: "john",
Operation: "add",
Next: nil,
Prev: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UpdateFeedMembersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| FeedGroupID | string | Yes | - |
| FeedID | string | Yes | - |
| Operation | string | Yes | Type of update operation to perform. One of: upsert, remove, set |
| Limit | int | No | - |
| Members | []FeedMemberRequest | No | List of members to upsert, remove, or set |
| Next | string | No | - |
| Prev | string | No | - |
AcceptFeedMemberInvite
Confirm and accept an invitation to join a feed as a member, facilitating collaboration and shared access. Use this method when you wish to join a feed you have been invited to.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Accept a feed member request
resp, err := feedsClient.AcceptFeedMemberInvite(context.Background(), &stream.AcceptFeedMemberInviteRequest{
FeedID: "john",
FeedGroupID: "user",
UserID: stream.PtrTo("john"),
User: &stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: AcceptFeedMemberInviteResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| FeedID | string | Yes | - |
| FeedGroupID | string | Yes | - |
| User | UserRequest | No | - |
| UserID | string | No | - |
QueryFeedMembers
Retrieve a list of all members associated with a specific feed to understand who has access and manage member interactions. This is useful for auditing and managing feed membership.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query feed members
resp, err := feedsClient.QueryFeedMembers(context.Background(), &stream.QueryFeedMembersRequest{
FeedGroupID: "user",
FeedID: "john",
Limit: stream.PtrTo(25),
Filter: map[string]any{},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with sort and prev
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query feed members
resp, err := feedsClient.QueryFeedMembers(context.Background(), &stream.QueryFeedMembersRequest{
FeedGroupID: "user",
FeedID: "john",
Sort: []stream.SortParamRequest{{Direction: stream.PtrTo(-1), Field: stream.PtrTo("created_at"), Type: stream.PtrTo("like")}},
Prev: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with next
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query feed members
resp, err := feedsClient.QueryFeedMembers(context.Background(), &stream.QueryFeedMembersRequest{
FeedGroupID: "user",
FeedID: "john",
Next: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: QueryFeedMembersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| FeedGroupID | string | Yes | - |
| FeedID | string | Yes | - |
| Filter | map[string]any | No | Filter parameters for the query |
| Limit | int | No | - |
| Next | string | No | - |
| Prev | string | No | - |
| Sort | []SortParamRequest | No | Sort parameters for the query |
RejectFeedMemberInvite
Decline an invitation to join a feed, preventing unwanted participation or access. Use this when you do not wish to be part of a feed you have been invited to.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Reject an invite to become a feed member
resp, err := feedsClient.RejectFeedMemberInvite(context.Background(), &stream.RejectFeedMemberInviteRequest{
FeedGroupID: "user",
FeedID: "john",
UserID: stream.PtrTo("john"),
User: &stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: RejectFeedMemberInviteResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| FeedGroupID | string | Yes | - |
| FeedID | string | Yes | - |
| User | UserRequest | No | - |
| UserID | string | No | - |
QueryPinnedActivities
Retrieves a list of activities that have been pinned for prominence in a feed. Use this to highlight important or popular activities to your users.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query pinned activities
resp, err := feedsClient.QueryPinnedActivities(context.Background(), &stream.QueryPinnedActivitiesRequest{
FeedGroupID: "user",
FeedID: "john",
Limit: stream.PtrTo(25),
Filter: map[string]any{},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with sort and next
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query pinned activities
resp, err := feedsClient.QueryPinnedActivities(context.Background(), &stream.QueryPinnedActivitiesRequest{
FeedGroupID: "user",
FeedID: "john",
Sort: []stream.SortParamRequest{{Direction: stream.PtrTo(-1), Field: stream.PtrTo("created_at"), Type: stream.PtrTo("like")}},
Next: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with prev and enrich_own_fields
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query pinned activities
resp, err := feedsClient.QueryPinnedActivities(context.Background(), &stream.QueryPinnedActivitiesRequest{
FeedGroupID: "user",
FeedID: "john",
Prev: nil,
EnrichOwnFields: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: QueryPinnedActivitiesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| FeedGroupID | string | Yes | - |
| FeedID | string | Yes | - |
| EnrichOwnFields | bool | No | - |
| Filter | map[string]any | No | Filters to apply to the query |
| Limit | int | No | - |
| Next | string | No | - |
| Prev | string | No | - |
| Sort | []SortParamRequest | No | Sorting parameters for the query |
GetFollowSuggestions
Receive personalized recommendations on which feeds or users to follow, enhancing user engagement and discovery of relevant content. This method is helpful for users looking to expand their network or interests.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Get follow suggestions
resp, err := feedsClient.GetFollowSuggestions(context.Background(), &stream.GetFollowSuggestionsRequest{
FeedGroupID: "user",
UserID: stream.PtrTo("john"),
Limit: stream.PtrTo(25),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: GetFollowSuggestionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| FeedGroupID | string | Yes | - |
| Limit | int | No | - |
| UserID | string | No | - |
RestoreFeedGroup
Restores a previously deleted feed group, reinstating its activities and user interactions. Use this to recover a feed group that needs to be active again after deletion.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Restore a feed group
resp, err := feedsClient.RestoreFeedGroup(context.Background(), &stream.RestoreFeedGroupRequest{
FeedGroupID: "user",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: RestoreFeedGroupResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| FeedGroupID | string | Yes | - |
GetFeedGroup
Retrieve details of an existing feed group to manage or display its contents effectively.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Get a feed group
resp, err := feedsClient.GetFeedGroup(context.Background(), &stream.GetFeedGroupRequest{
ID: "activity-123",
IncludeSoftDeleted: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: GetFeedGroupResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
| IncludeSoftDeleted | bool | No | - |
GetOrCreateFeedGroup
Obtain an existing feed group or create a new one if it doesn't exist, ensuring your application can seamlessly manage feed group resources.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Get or create a feed group
resp, err := feedsClient.GetOrCreateFeedGroup(context.Background(), &stream.GetOrCreateFeedGroupRequest{
ID: "activity-123",
ActivityProcessors: []stream.ActivityProcessorConfig{{Type: "like"}},
ActivitySelectors: []stream.ActivitySelectorConfig{{Type: "like"}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with aggregation and custom
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Get or create a feed group
resp, err := feedsClient.GetOrCreateFeedGroup(context.Background(), &stream.GetOrCreateFeedGroupRequest{
ID: "activity-123",
Aggregation: &stream.AggregationConfig{ActivitiesSort: "value"},
Custom: map[string]any{},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with default_visibility and notification
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Get or create a feed group
resp, err := feedsClient.GetOrCreateFeedGroup(context.Background(), &stream.GetOrCreateFeedGroupRequest{
ID: "activity-123",
DefaultVisibility: stream.PtrTo("value"),
Notification: &stream.NotificationConfig{DeduplicationWindow: "value"},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with push_notification and ranking
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Get or create a feed group
resp, err := feedsClient.GetOrCreateFeedGroup(context.Background(), &stream.GetOrCreateFeedGroupRequest{
ID: "activity-123",
PushNotification: &stream.PushNotificationConfig{EnablePush: false},
Ranking: &stream.RankingConfig{Type: "like", Defaults: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: GetOrCreateFeedGroupResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
| ActivityProcessors | []ActivityProcessorConfig | No | Configuration for activity processors |
| ActivitySelectors | []ActivitySelectorConfig | No | Configuration for activity selectors |
| Aggregation | AggregationConfig | No | Configuration for activity aggregation |
| Custom | map[string]any | No | Custom data for the feed group |
| DefaultVisibility | string | No | Default visibility for the feed group, can be 'public', 'visible', 'followers', 'members', or 'pr... |
| Notification | NotificationConfig | No | Configuration for notifications |
| PushNotification | PushNotificationConfig | No | - |
| Ranking | RankingConfig | No | Configuration for activity ranking |
| Stories | StoriesConfig | No | Configuration for stories functionality |
UpdateFeedGroup
Modify the properties of an existing feed group to keep its information up-to-date and relevant to your application's needs.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update a feed group
resp, err := feedsClient.UpdateFeedGroup(context.Background(), &stream.UpdateFeedGroupRequest{
ID: "activity-123",
ActivityProcessors: []stream.ActivityProcessorConfig{{Type: "like"}},
ActivitySelectors: []stream.ActivitySelectorConfig{{Type: "like"}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with aggregation and custom
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update a feed group
resp, err := feedsClient.UpdateFeedGroup(context.Background(), &stream.UpdateFeedGroupRequest{
ID: "activity-123",
Aggregation: &stream.AggregationConfig{ActivitiesSort: "value"},
Custom: map[string]any{},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with default_visibility and notification
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update a feed group
resp, err := feedsClient.UpdateFeedGroup(context.Background(), &stream.UpdateFeedGroupRequest{
ID: "activity-123",
DefaultVisibility: stream.PtrTo("value"),
Notification: &stream.NotificationConfig{DeduplicationWindow: "value"},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with push_notification and ranking
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update a feed group
resp, err := feedsClient.UpdateFeedGroup(context.Background(), &stream.UpdateFeedGroupRequest{
ID: "activity-123",
PushNotification: &stream.PushNotificationConfig{EnablePush: false},
Ranking: &stream.RankingConfig{Type: "like", Defaults: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UpdateFeedGroupResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
| ActivityProcessors | []ActivityProcessorConfig | No | Configuration for activity processors |
| ActivitySelectors | []ActivitySelectorConfig | No | Configuration for activity selectors |
| Aggregation | AggregationConfig | No | Configuration for activity aggregation |
| Custom | map[string]any | No | Custom data for the feed group |
| DefaultVisibility | string | No | - |
| Notification | NotificationConfig | No | Configuration for notifications |
| PushNotification | PushNotificationConfig | No | - |
| Ranking | RankingConfig | No | Configuration for activity ranking |
| Stories | StoriesConfig | No | Configuration for stories functionality |
DeleteFeedGroup
Remove an existing feed group to free up resources or when the feed group is no longer needed in your application.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Delete a feed group
resp, err := feedsClient.DeleteFeedGroup(context.Background(), &stream.DeleteFeedGroupRequest{
ID: "activity-123",
HardDelete: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: DeleteFeedGroupResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
| HardDelete | bool | No | - |
ListFeedViews
Retrieve a list of all feed views to easily navigate and manage the available views in an application.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// List all feed views
resp, err := feedsClient.ListFeedViews(context.Background())
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: ListFeedViewsResponse
CreateFeedView
Generate a new feed view to organize and present feed data in a customized manner for users.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Create a new feed view
resp, err := feedsClient.CreateFeedView(context.Background(), &stream.CreateFeedViewRequest{
ID: "activity-123",
ActivitySelectors: []stream.ActivitySelectorConfig{{Type: "like"}},
Aggregation: &stream.AggregationConfig{ActivitiesSort: "value"},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with ranking
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Create a new feed view
resp, err := feedsClient.CreateFeedView(context.Background(), &stream.CreateFeedViewRequest{
ID: "activity-123",
Ranking: &stream.RankingConfig{Type: "like", Defaults: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: CreateFeedViewResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | Unique identifier for the feed view |
| ActivitySelectors | []ActivitySelectorConfig | No | Configuration for selecting activities |
| Aggregation | AggregationConfig | No | Configuration for aggregating activities |
| Ranking | RankingConfig | No | Configuration for ranking activities |
GetFeedView
Access specific details of an existing feed view to analyze or display its configuration and content.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Get a feed view
resp, err := feedsClient.GetFeedView(context.Background(), &stream.GetFeedViewRequest{
ID: "activity-123",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: GetFeedViewResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
GetOrCreateFeedView
Retrieve an existing feed view or create a new one if it doesn't exist, ensuring your application can always access the necessary view configurations.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Get or create a feed view
resp, err := feedsClient.GetOrCreateFeedView(context.Background(), &stream.GetOrCreateFeedViewRequest{
ID: "activity-123",
ActivitySelectors: []stream.ActivitySelectorConfig{{Type: "like"}},
Aggregation: &stream.AggregationConfig{ActivitiesSort: "value"},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with ranking
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Get or create a feed view
resp, err := feedsClient.GetOrCreateFeedView(context.Background(), &stream.GetOrCreateFeedViewRequest{
ID: "activity-123",
Ranking: &stream.RankingConfig{Type: "like", Defaults: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: GetOrCreateFeedViewResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
| ActivitySelectors | []ActivitySelectorConfig | No | Configuration for selecting activities |
| Aggregation | AggregationConfig | No | Configuration for aggregating activities |
| Ranking | RankingConfig | No | Configuration for ranking activities |
UpdateFeedView
Alter the settings or content of an existing feed view to reflect changes in data presentation or user requirements.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update a feed view
resp, err := feedsClient.UpdateFeedView(context.Background(), &stream.UpdateFeedViewRequest{
ID: "activity-123",
ActivitySelectors: []stream.ActivitySelectorConfig{{Type: "like"}},
Aggregation: &stream.AggregationConfig{ActivitiesSort: "value"},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with ranking
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update a feed view
resp, err := feedsClient.UpdateFeedView(context.Background(), &stream.UpdateFeedViewRequest{
ID: "activity-123",
Ranking: &stream.RankingConfig{Type: "like", Defaults: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UpdateFeedViewResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
| ActivitySelectors | []ActivitySelectorConfig | No | Updated configuration for selecting activities |
| Aggregation | AggregationConfig | No | Updated configuration for aggregating activities |
| Ranking | RankingConfig | No | Updated configuration for ranking activities |
DeleteFeedView
Remove an existing feed view when it is no longer required, helping to maintain an organized and efficient feed view collection.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Delete a feed view
resp, err := feedsClient.DeleteFeedView(context.Background(), &stream.DeleteFeedViewRequest{
ID: "activity-123",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: DeleteFeedViewResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
ListFeedVisibilities
Retrieve a list of visibility settings for multiple feeds. Use this method to gain insights into which feeds are public, private, or have custom visibility rules.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// List feed visibilities
resp, err := feedsClient.ListFeedVisibilities(context.Background())
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: ListFeedVisibilitiesResponse
GetFeedVisibility
Obtain the visibility status of a specific feed. This method is useful for checking whether a feed is accessible to certain users or groups.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Get feed visibility
resp, err := feedsClient.GetFeedVisibility(context.Background(), &stream.GetFeedVisibilityRequest{
Name: "My Feed",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: GetFeedVisibilityResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Name | string | Yes | - |
UpdateFeedVisibility
Modify the visibility settings of a feed. Use this to change who can view or interact with a feed, enhancing content privacy or accessibility as needed.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update Feed Visibility
resp, err := feedsClient.UpdateFeedVisibility(context.Background(), &stream.UpdateFeedVisibilityRequest{
Name: "My Feed",
Grants: map[string]any{},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UpdateFeedVisibilityResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Name | string | Yes | - |
| Grants | map[string]any | No | Updated permission grants for each role |
CreateFeedsBatch
Simultaneously create multiple feeds with a single request. This method is ideal for initializing multiple content streams efficiently.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Create multiple feeds at once
resp, err := feedsClient.CreateFeedsBatch(context.Background(), &stream.CreateFeedsBatchRequest{
Feeds: []string{"user:john", "timeline:global"},
EnrichOwnFields: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: CreateFeedsBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Feeds | []FeedRequest | Yes | List of feeds to create |
| EnrichOwnFields | bool | No | If true, enriches the created feeds with own_* fields (own_follows, own_followings, own_capabilit... |
DeleteFeedsBatch
Remove multiple feeds in one operation. Use this method to streamline the cleanup process by deleting several feeds at once.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Delete multiple feeds
resp, err := feedsClient.DeleteFeedsBatch(context.Background(), &stream.DeleteFeedsBatchRequest{
Feeds: []string{"user:john", "timeline:global"},
HardDelete: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: DeleteFeedsBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Feeds | []string | Yes | List of fully qualified feed IDs (format: group_id:feed_id) to delete |
| HardDelete | bool | No | Whether to permanently delete the feeds instead of soft delete |
OwnBatch
Retrieve ownership details for multiple feeds. This is useful for managing or auditing which feeds you or your organization control.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Get own fields for multiple feeds
resp, err := feedsClient.OwnBatch(context.Background(), &stream.OwnBatchRequest{
Feeds: []string{"user:john", "timeline:global"},
UserID: stream.PtrTo("john"),
User: &stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with fields
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Get own fields for multiple feeds
resp, err := feedsClient.OwnBatch(context.Background(), &stream.OwnBatchRequest{
Feeds: []string{"user:john", "timeline:global"},
Fields: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: OwnBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Feeds | []string | Yes | List of feed IDs to get own fields for |
| Fields | []string | No | Optional list of specific fields to return. If not specified, all fields (own_follows, own_follow... |
| User | UserRequest | No | - |
| UserID | string | No | - |
QueryFeeds
Search and filter feeds based on specific criteria. Use this method to efficiently locate feeds that match your interests or requirements.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query feeds
resp, err := feedsClient.QueryFeeds(context.Background(), &stream.QueryFeedsRequest{
Limit: stream.PtrTo(25),
Filter: map[string]any{},
Sort: []stream.SortParamRequest{{Direction: stream.PtrTo(-1), Field: stream.PtrTo("created_at"), Type: stream.PtrTo("like")}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with next and prev
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query feeds
resp, err := feedsClient.QueryFeeds(context.Background(), &stream.QueryFeedsRequest{
Next: nil,
Prev: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with enrich_own_fields and watch
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query feeds
resp, err := feedsClient.QueryFeeds(context.Background(), &stream.QueryFeedsRequest{
EnrichOwnFields: stream.PtrTo(false),
Watch: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: QueryFeedsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| EnrichOwnFields | bool | No | - |
| Filter | map[string]any | No | Filters to apply to the query |
| Limit | int | No | - |
| Next | string | No | - |
| Prev | string | No | - |
| Sort | []SortParamRequest | No | Sorting parameters for the query |
| Watch | bool | No | Whether to subscribe to realtime updates |
GetFeedsRateLimits
Check the rate limits associated with feed operations. This method helps you understand the frequency restrictions on feed interactions to avoid exceeding usage quotas.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Get Feeds Rate Limits
resp, err := feedsClient.GetFeedsRateLimits(context.Background(), &stream.GetFeedsRateLimitsRequest{
Endpoints: stream.PtrTo("value"),
Android: stream.PtrTo(false),
Ios: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with web and server_side
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Get Feeds Rate Limits
resp, err := feedsClient.GetFeedsRateLimits(context.Background(), &stream.GetFeedsRateLimitsRequest{
Web: stream.PtrTo(false),
ServerSide: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: GetFeedsRateLimitsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Endpoints | string | No | - |
| Android | bool | No | - |
| Ios | bool | No | - |
| Web | bool | No | - |
| ServerSide | bool | No | - |
Follow
Establish a follow relationship with a feed, allowing you to receive updates or notifications about its content. Use this to stay informed about specific topics or creators.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Create a follow
resp, err := feedsClient.Follow(context.Background(), &stream.FollowRequest{
Source: "user:john",
Target: "timeline:jane",
SkipPush: stream.PtrTo(false),
CopyCustomToNotification: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with create_notification_activity and create_users
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Create a follow
resp, err := feedsClient.Follow(context.Background(), &stream.FollowRequest{
Source: "user:john",
Target: "timeline:jane",
CreateNotificationActivity: stream.PtrTo(false),
CreateUsers: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with custom and enrich_own_fields
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Create a follow
resp, err := feedsClient.Follow(context.Background(), &stream.FollowRequest{
Source: "user:john",
Target: "timeline:jane",
Custom: map[string]any{},
EnrichOwnFields: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with push_preference and activity_copy_limit
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Create a follow
resp, err := feedsClient.Follow(context.Background(), &stream.FollowRequest{
Source: "user:john",
Target: "timeline:jane",
PushPreference: stream.PtrTo("value"),
ActivityCopyLimit: stream.PtrTo(10),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: SingleFollowResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Source | string | Yes | Fully qualified ID of the source feed |
| Target | string | Yes | Fully qualified ID of the target feed |
| ActivityCopyLimit | int | No | Maximum number of historical activities to copy from the target feed when the follow is first mat... |
| CopyCustomToNotification | bool | No | Whether to copy custom data to the notification activity (only applies when create_notification_a... |
| CreateNotificationActivity | bool | No | Whether to create a notification activity for this follow |
| CreateUsers | bool | No | If true, auto-creates users referenced by the source and target FIDs when they don't already exis... |
| Custom | map[string]any | No | Custom data for the follow relationship |
| EnrichOwnFields | bool | No | If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_fo... |
| PushPreference | string | No | Push preference for the follow relationship |
| SkipPush | bool | No | Whether to skip push for this follow |
| Status | string | No | Status of the follow relationship. One of: accepted, pending, rejected |
UpdateFollow
Modify an existing follow relationship. This method can be used to change your notification preferences or unfollow a feed when it is no longer relevant.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update a follow
resp, err := feedsClient.UpdateFollow(context.Background(), &stream.UpdateFollowRequest{
Source: "user:john",
Target: "timeline:jane",
SkipPush: stream.PtrTo(false),
CopyCustomToNotification: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with create_notification_activity and create_users
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update a follow
resp, err := feedsClient.UpdateFollow(context.Background(), &stream.UpdateFollowRequest{
Source: "user:john",
Target: "timeline:jane",
CreateNotificationActivity: stream.PtrTo(false),
CreateUsers: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with custom and enrich_own_fields
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update a follow
resp, err := feedsClient.UpdateFollow(context.Background(), &stream.UpdateFollowRequest{
Source: "user:john",
Target: "timeline:jane",
Custom: map[string]any{},
EnrichOwnFields: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with follower_role and push_preference
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update a follow
resp, err := feedsClient.UpdateFollow(context.Background(), &stream.UpdateFollowRequest{
Source: "user:john",
Target: "timeline:jane",
FollowerRole: stream.PtrTo("member"),
PushPreference: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UpdateFollowResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Source | string | Yes | Fully qualified ID of the source feed |
| Target | string | Yes | Fully qualified ID of the target feed |
| ActivityCopyLimit | int | No | Maximum number of historical activities to copy from the target feed when the follow is first mat... |
| CopyCustomToNotification | bool | No | Whether to copy custom data to the notification activity (only applies when create_notification_a... |
| CreateNotificationActivity | bool | No | Whether to create a notification activity for this follow |
| CreateUsers | bool | No | If true, auto-creates users referenced by the source and target FIDs when they don't already exis... |
| Custom | map[string]any | No | Custom data for the follow relationship |
| EnrichOwnFields | bool | No | If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_fo... |
| FollowerRole | string | No | - |
| PushPreference | string | No | Push preference for the follow relationship |
| SkipPush | bool | No | Whether to skip push for this follow |
| Status | string | No | Status of the follow relationship. One of: accepted, pending, rejected |
AcceptFollow
Approve a pending follow request to allow a user to follow your feed, useful for managing access in private or protected feeds.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Accept a follow request
resp, err := feedsClient.AcceptFollow(context.Background(), &stream.AcceptFollowRequest{
Source: "user:john",
Target: "timeline:jane",
FollowerRole: stream.PtrTo("member"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: AcceptFollowResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Source | string | Yes | Fully qualified ID of the source feed |
| Target | string | Yes | Fully qualified ID of the target feed |
| FollowerRole | string | No | Optional role for the follower in the follow relationship |
FollowBatch
Add multiple followers to a feed simultaneously, ideal for quickly expanding your feed's audience.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Create multiple follows at once
resp, err := feedsClient.FollowBatch(context.Background(), &stream.FollowBatchRequest{
Follows: []stream.FollowRequest{{Source: "user:john", Target: "timeline:jane", SkipPush: stream.PtrTo(false), Status: stream.PtrTo("active")}},
CreateUsers: stream.PtrTo(false),
EnrichOwnFields: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: FollowBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Follows | []FollowRequest | Yes | List of follow relationships to create |
| CreateUsers | bool | No | If true, auto-creates users referenced by source/target FIDs in the batch when they don't already... |
| EnrichOwnFields | bool | No | If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_fo... |
GetOrCreateFollows
Ensure specified follows exist by either retrieving existing ones or creating them as needed, simplifying follow management.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Upsert multiple follows at once
resp, err := feedsClient.GetOrCreateFollows(context.Background(), &stream.GetOrCreateFollowsRequest{
Follows: []stream.FollowRequest{{Source: "user:john", Target: "timeline:jane", SkipPush: stream.PtrTo(false), Status: stream.PtrTo("active")}},
CreateUsers: stream.PtrTo(false),
EnrichOwnFields: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: FollowBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Follows | []FollowRequest | Yes | List of follow relationships to create |
| CreateUsers | bool | No | If true, auto-creates users referenced by source/target FIDs in the batch when they don't already... |
| EnrichOwnFields | bool | No | If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_fo... |
QueryFollows
Retrieve a list of users who are following a specific feed, helping you analyze and manage your audience.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query follows
resp, err := feedsClient.QueryFollows(context.Background(), &stream.QueryFollowsRequest{
Limit: stream.PtrTo(25),
Filter: map[string]any{},
Sort: []stream.SortParamRequest{{Direction: stream.PtrTo(-1), Field: stream.PtrTo("created_at"), Type: stream.PtrTo("like")}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with prev and next
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query follows
resp, err := feedsClient.QueryFollows(context.Background(), &stream.QueryFollowsRequest{
Prev: nil,
Next: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: QueryFollowsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Filter | map[string]any | No | Filters to apply to the query |
| Limit | int | No | - |
| Next | string | No | - |
| Prev | string | No | - |
| Sort | []SortParamRequest | No | Sorting parameters for the query |
RejectFollow
Deny a follow request to prevent a user from following your feed, useful for maintaining privacy or exclusivity.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Reject a follow request
resp, err := feedsClient.RejectFollow(context.Background(), &stream.RejectFollowRequest{
Source: "user:john",
Target: "timeline:jane",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: RejectFollowResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Source | string | Yes | Fully qualified ID of the source feed |
| Target | string | Yes | Fully qualified ID of the target feed |
Unfollow
Remove a user from following a feed, helpful for managing your feed's audience or curating content access.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Unfollow a feed
resp, err := feedsClient.Unfollow(context.Background(), &stream.UnfollowRequest{
Source: "user:john",
Target: "timeline:jane",
DeleteNotificationActivity: stream.PtrTo(false),
KeepHistory: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with enrich_own_fields
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Unfollow a feed
resp, err := feedsClient.Unfollow(context.Background(), &stream.UnfollowRequest{
Source: "user:john",
Target: "timeline:jane",
EnrichOwnFields: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UnfollowResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Source | string | Yes | - |
| Target | string | Yes | - |
| DeleteNotificationActivity | bool | No | - |
| KeepHistory | bool | No | - |
| EnrichOwnFields | bool | No | - |
CreateMembershipLevel
Establish a new membership tier with specific benefits or access rights, allowing for tailored user engagement strategies.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Create membership level
resp, err := feedsClient.CreateMembershipLevel(context.Background(), &stream.CreateMembershipLevelRequest{
ID: "activity-123",
Name: "My Feed",
Custom: map[string]any{},
Description: stream.PtrTo("A description"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with priority and tags
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Create membership level
resp, err := feedsClient.CreateMembershipLevel(context.Background(), &stream.CreateMembershipLevelRequest{
ID: "activity-123",
Name: "My Feed",
Priority: stream.PtrTo(1),
Tags: []string{"tag1", "tag2"},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: CreateMembershipLevelResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | Unique identifier for the membership level |
| Name | string | Yes | Display name for the membership level |
| Custom | map[string]any | No | Custom data for the membership level |
| Description | string | No | Optional description of the membership level |
| Priority | int | No | Priority level (higher numbers = higher priority) |
| Tags | []string | No | Activity tags this membership level gives access to |
QueryMembershipLevels
Retrieve existing membership levels to review or assess the tiers available for users, aiding in membership management.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query membership levels
resp, err := feedsClient.QueryMembershipLevels(context.Background(), &stream.QueryMembershipLevelsRequest{
Limit: stream.PtrTo(25),
Filter: map[string]any{},
Sort: []stream.SortParamRequest{{Direction: stream.PtrTo(-1), Field: stream.PtrTo("created_at"), Type: stream.PtrTo("like")}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with prev and next
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query membership levels
resp, err := feedsClient.QueryMembershipLevels(context.Background(), &stream.QueryMembershipLevelsRequest{
Prev: nil,
Next: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: QueryMembershipLevelsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Filter | map[string]any | No | Filters to apply to the query |
| Limit | int | No | - |
| Next | string | No | - |
| Prev | string | No | - |
| Sort | []SortParamRequest | No | Sorting parameters for the query |
UpdateMembershipLevel
Modify an existing membership tier to adjust benefits or access rights, supporting dynamic content or service offerings.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update membership level
resp, err := feedsClient.UpdateMembershipLevel(context.Background(), &stream.UpdateMembershipLevelRequest{
ID: "activity-123",
Name: stream.PtrTo("My Feed"),
Description: stream.PtrTo("A description"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with custom and priority
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update membership level
resp, err := feedsClient.UpdateMembershipLevel(context.Background(), &stream.UpdateMembershipLevelRequest{
ID: "activity-123",
Custom: map[string]any{},
Priority: stream.PtrTo(1),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with tags
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Update membership level
resp, err := feedsClient.UpdateMembershipLevel(context.Background(), &stream.UpdateMembershipLevelRequest{
ID: "activity-123",
Tags: []string{"tag1", "tag2"},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UpdateMembershipLevelResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
| Custom | map[string]any | No | Custom data for the membership level |
| Description | string | No | Optional description of the membership level |
| Name | string | No | Display name for the membership level |
| Priority | int | No | Priority level (higher numbers = higher priority) |
| Tags | []string | No | Activity tags this membership level gives access to |
DeleteMembershipLevel
Remove a membership level when it's no longer needed, streamlining your membership structure and offerings.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Delete membership level
resp, err := feedsClient.DeleteMembershipLevel(context.Background(), &stream.DeleteMembershipLevelRequest{
ID: "activity-123",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
QueryFeedsUsageStats
Retrieve comprehensive usage statistics for a specific feed, helping you analyze engagement and performance trends over time.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query Feed Usage Statistics
resp, err := feedsClient.QueryFeedsUsageStats(context.Background(), &stream.QueryFeedsUsageStatsRequest{
From: stream.PtrTo("value"),
To: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: QueryFeedsUsageStatsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| From | string | No | Start date in YYYY-MM-DD format (optional, defaults to 30 days ago) |
| To | string | No | End date in YYYY-MM-DD format (optional, defaults to today) |
UnfollowBatch
Efficiently unfollow multiple feeds in a single operation, ideal for streamlining feed management when you no longer wish to receive updates from several sources.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Unfollow multiple feeds at once
resp, err := feedsClient.UnfollowBatch(context.Background(), &stream.UnfollowBatchRequest{
Follows: []stream.UnfollowPair{{Source: "user:john", Target: "timeline:jane"}},
DeleteNotificationActivity: stream.PtrTo(false),
EnrichOwnFields: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UnfollowBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Follows | []UnfollowPair | Yes | List of follow relationships to remove, each with optional keep_history |
| DeleteNotificationActivity | bool | No | Whether to delete the corresponding notification activity (default: false) |
| EnrichOwnFields | bool | No | If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_fo... |
GetOrCreateUnfollows
Ensure feeds are unfollowed without duplication by using an idempotent operation that simplifies management when transitioning away from specific content sources.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Unfollow multiple feeds (idempotent)
resp, err := feedsClient.GetOrCreateUnfollows(context.Background(), &stream.GetOrCreateUnfollowsRequest{
Follows: []stream.UnfollowPair{{Source: "user:john", Target: "timeline:jane"}},
DeleteNotificationActivity: stream.PtrTo(false),
EnrichOwnFields: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UnfollowBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Follows | []UnfollowPair | Yes | List of follow relationships to remove, each with optional keep_history |
| DeleteNotificationActivity | bool | No | Whether to delete the corresponding notification activity (default: false) |
| EnrichOwnFields | bool | No | If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_fo... |
DeleteFeedUserData
Permanently remove all data associated with a user's feed, useful for maintaining privacy and complying with data protection regulations when users request data deletion.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Delete all feed data for a user
resp, err := feedsClient.DeleteFeedUserData(context.Background(), &stream.DeleteFeedUserDataRequest{
UserID: "john",
HardDelete: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: DeleteFeedUserDataResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| UserID | string | Yes | - |
| HardDelete | bool | No | Whether to perform a hard delete instead of a soft delete |
ExportFeedUserData
Download a complete set of a user's feed data, allowing for backup, analysis, or migration to other systems while ensuring data portability.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Export all feed data for a user
resp, err := feedsClient.ExportFeedUserData(context.Background(), &stream.ExportFeedUserDataRequest{
UserID: "john",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: ExportFeedUserDataResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| UserID | string | Yes | - |
Types Reference
This section documents the types/interfaces used in this API. These types are extracted from the OpenAPI specification.
AcceptFeedMemberInviteResponse
type AcceptFeedMemberInviteResponse struct {
Duration string `json:"duration,omitempty"`
Member FeedMemberResponse `json:"member,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| member | FeedMemberResponse | Yes | The feed member after accepting the invite |
AcceptFollowResponse
type AcceptFollowResponse struct {
Duration string `json:"duration,omitempty"`
Follow FollowResponse `json:"follow,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| follow | FollowResponse | Yes | The accepted follow relationship |
Action
type Action struct {
Name string `json:"name,omitempty"`
Style string `json:"style,omitempty"`
Text string `json:"text,omitempty"`
Type string `json:"type,omitempty"`
Value string `json:"value,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | |
| text | string | Yes | |
| type | string | Yes | |
| style | string | No | |
| value | string | No |
ActivityFeedbackResponse
Response for activity feedback submission
type ActivityFeedbackResponse struct {
ActivityId string `json:"activity_id,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_id | string | Yes | The ID of the activity that received feedback |
| duration | string | Yes |
ActivityPinResponse
type ActivityPinResponse struct {
Activity ActivityResponse `json:"activity,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Feed string `json:"feed,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
User UserResponse `json:"user,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The pinned activity |
| created_at | float64 | Yes | When the pin was created |
| feed | string | Yes | ID of the feed where activity is pinned |
| updated_at | float64 | Yes | When the pin was last updated |
| user | UserResponse | Yes | User who pinned the activity |
ActivityProcessorConfig
type ActivityProcessorConfig struct {
Type string `json:"type,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | Type of activity processor (required) |
ActivityRequest
type ActivityRequest struct {
Attachments []Attachment `json:"attachments,omitempty"`
CollectionRefs []string `json:"collection_refs,omitempty"`
CopyCustomToNotification bool `json:"copy_custom_to_notification,omitempty"`
CreateNotificationActivity bool `json:"create_notification_activity,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
ExpiresAt string `json:"expires_at,omitempty"`
Feeds []string `json:"feeds,omitempty"`
FilterTags []string `json:"filter_tags,omitempty"`
Id string `json:"id,omitempty"`
InterestTags []string `json:"interest_tags,omitempty"`
Location Location `json:"location,omitempty"`
MentionedUserIds []string `json:"mentioned_user_ids,omitempty"`
ParentId string `json:"parent_id,omitempty"`
PollId string `json:"poll_id,omitempty"`
RestrictReplies string `json:"restrict_replies,omitempty"`
SearchData map[string]interface{} `json:"search_data,omitempty"`
SkipEnrichUrl bool `json:"skip_enrich_url,omitempty"`
SkipPush bool `json:"skip_push,omitempty"`
Text string `json:"text,omitempty"`
Type string `json:"type,omitempty"`
UserId string `json:"user_id,omitempty"`
Visibility string `json:"visibility,omitempty"`
VisibilityTag string `json:"visibility_tag,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| feeds | []string | Yes | List of feeds to add the activity to with a default max limit of 25 feeds |
| type | string | Yes | Type of activity |
| attachments | []Attachment | No | List of attachments for the activity |
| collection_refs | []string | No | Collections that this activity references |
| copy_custom_to_notification | bool | No | Whether to copy custom data to the notification activity (only applies when c... |
| create_notification_activity | bool | No | Whether to create notification activities for mentioned users |
| custom | map[string]interface{} | No | Custom data for the activity |
| expires_at | string | No | Expiration time for the activity |
| filter_tags | []string | No | Tags for filtering activities |
| id | string | No | Optional ID for the activity |
| interest_tags | []string | No | Tags for indicating user interests |
| location | Location | No | Geographic location related to the activity |
| mentioned_user_ids | []string | No | List of users mentioned in the activity |
| parent_id | string | No | ID of parent activity for replies/comments |
| poll_id | string | No | ID of a poll to attach to activity |
| restrict_replies | string | No | Controls who can add comments/replies to this activity. One of: everyone, peo... |
| search_data | map[string]interface{} | No | Additional data for search indexing |
| skip_enrich_url | bool | No | Whether to skip URL enrichment for the activity |
| skip_push | bool | No | Whether to skip push notifications |
| text | string | No | Text content of the activity |
| user_id | string | No | ID of the user creating the activity |
| visibility | string | No | Visibility setting for the activity. One of: public, private, tag |
| visibility_tag | string | No | If visibility is 'tag', this is the tag name and is required |
ActivityResponse
type ActivityResponse struct {
Attachments []Attachment `json:"attachments,omitempty"`
BookmarkCount int `json:"bookmark_count,omitempty"`
Collections map[string]interface{} `json:"collections,omitempty"`
CommentCount int `json:"comment_count,omitempty"`
Comments []CommentResponse `json:"comments,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
CurrentFeed FeedResponse `json:"current_feed,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
DeletedAt float64 `json:"deleted_at,omitempty"`
EditedAt float64 `json:"edited_at,omitempty"`
ExpiresAt float64 `json:"expires_at,omitempty"`
Feeds []string `json:"feeds,omitempty"`
FilterTags []string `json:"filter_tags,omitempty"`
FriendReactionCount int `json:"friend_reaction_count,omitempty"`
FriendReactions []FeedsReactionResponse `json:"friend_reactions,omitempty"`
Hidden bool `json:"hidden,omitempty"`
Id string `json:"id,omitempty"`
InterestTags []string `json:"interest_tags,omitempty"`
IsRead bool `json:"is_read,omitempty"`
IsSeen bool `json:"is_seen,omitempty"`
IsWatched bool `json:"is_watched,omitempty"`
LatestReactions []FeedsReactionResponse `json:"latest_reactions,omitempty"`
Location Location `json:"location,omitempty"`
MentionedUsers []UserResponse `json:"mentioned_users,omitempty"`
Metrics map[string]interface{} `json:"metrics,omitempty"`
Moderation ModerationV2Response `json:"moderation,omitempty"`
ModerationAction string `json:"moderation_action,omitempty"`
NotificationContext NotificationContext `json:"notification_context,omitempty"`
OwnBookmarks []BookmarkResponse `json:"own_bookmarks,omitempty"`
OwnReactions []FeedsReactionResponse `json:"own_reactions,omitempty"`
Parent ActivityResponse `json:"parent,omitempty"`
Poll PollResponseData `json:"poll,omitempty"`
Popularity int `json:"popularity,omitempty"`
Preview bool `json:"preview,omitempty"`
ReactionCount int `json:"reaction_count,omitempty"`
ReactionGroups map[string]interface{} `json:"reaction_groups,omitempty"`
RestrictReplies string `json:"restrict_replies,omitempty"`
Score float64 `json:"score,omitempty"`
ScoreVars map[string]interface{} `json:"score_vars,omitempty"`
SearchData map[string]interface{} `json:"search_data,omitempty"`
SelectorSource string `json:"selector_source,omitempty"`
ShareCount int `json:"share_count,omitempty"`
Text string `json:"text,omitempty"`
Type string `json:"type,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
User UserResponse `json:"user,omitempty"`
Visibility string `json:"visibility,omitempty"`
VisibilityTag string `json:"visibility_tag,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| attachments | []Attachment | Yes | Media attachments for the activity |
| bookmark_count | int | Yes | Number of bookmarks on the activity |
| collections | map[string]interface{} | Yes | Enriched collection data referenced by this activity |
| comment_count | int | Yes | Number of comments on the activity |
| comments | []CommentResponse | Yes | Latest 5 comments of this activity (comment replies excluded) |
| created_at | float64 | Yes | When the activity was created |
| custom | map[string]interface{} | Yes | Custom data for the activity |
| feeds | []string | Yes | List of feed IDs containing this activity |
| filter_tags | []string | Yes | Tags for filtering |
| hidden | bool | Yes | If this activity is hidden by this user (using activity feedback) |
| id | string | Yes | Unique identifier for the activity |
| interest_tags | []string | Yes | Tags for user interests |
| latest_reactions | []FeedsReactionResponse | Yes | Recent reactions to the activity |
| mentioned_users | []UserResponse | Yes | Users mentioned in the activity |
| own_bookmarks | []BookmarkResponse | Yes | Current user's bookmarks for this activity |
| own_reactions | []FeedsReactionResponse | Yes | Current user's reactions to this activity |
| popularity | int | Yes | Popularity score of the activity |
| preview | bool | Yes | If this activity is obfuscated for this user. For premium content where you w... |
| reaction_count | int | Yes | Number of reactions to the activity |
| reaction_groups | map[string]interface{} | Yes | Grouped reactions by type |
| restrict_replies | string | Yes | Controls who can add comments/replies to this activity. One of: everyone, peo... |
| score | float64 | Yes | Ranking score for this activity |
| search_data | map[string]interface{} | Yes | Data for search indexing |
| share_count | int | Yes | Number of times the activity was shared |
| type | string | Yes | Type of activity |
| updated_at | float64 | Yes | When the activity was last updated |
| user | UserResponse | Yes | User who created the activity |
| visibility | string | Yes | Visibility setting for the activity. One of: public, private, tag |
| current_feed | FeedResponse | No | Feed context for this activity view. If an activity is added only to one feed... |
| deleted_at | float64 | No | When the activity was deleted |
| edited_at | float64 | No | When the activity was last edited |
| expires_at | float64 | No | When the activity will expire |
| friend_reaction_count | int | No | Total count of reactions from friends on this activity |
| friend_reactions | []FeedsReactionResponse | No | Reactions from users the current user follows or has mutual follows with |
| is_read | bool | No | Whether this activity has been read. Only set for feed groups with notificati... |
| is_seen | bool | No | Whether this activity has been seen. Only set for feed groups with notificati... |
| is_watched | bool | No | |
| location | Location | No | Geographic location related to the activity |
| metrics | map[string]interface{} | No | |
| moderation | ModerationV2Response | No | Moderation information |
| moderation_action | string | No | |
| notification_context | NotificationContext | No | Notification context data for the activity (if this is a reaction, comment, f... |
| parent | ActivityResponse | No | Parent activity (if this is a reply/comment) |
| poll | PollResponseData | No | Poll attached to this activity |
| score_vars | map[string]interface{} | No | Variable values used at ranking time. Only included when include_score_vars i... |
| selector_source | string | No | Which activity selector provided this activity (e.g., 'following', 'popular',... |
| text | string | No | Text content of the activity |
| visibility_tag | string | No | If visibility is 'tag', this is the tag name |
ActivitySelectorConfig
type ActivitySelectorConfig struct {
CutoffTime string `json:"cutoff_time,omitempty"`
CutoffWindow string `json:"cutoff_window,omitempty"`
Filter map[string]interface{} `json:"filter,omitempty"`
MinPopularity int `json:"min_popularity,omitempty"`
Params map[string]interface{} `json:"params,omitempty"`
Sort []SortParamRequest `json:"sort,omitempty"`
Type string `json:"type,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | Type of selector. One of: popular, proximity, following, current_feed, query,... |
| cutoff_time | string | No | Time threshold for activity selection (string). Expected RFC3339 format (e.g.... |
| cutoff_window | string | No | Flexible relative time window for activity selection (e.g., '1h', '3d', '1y')... |
| filter | map[string]interface{} | No | Filter for activity selection |
| min_popularity | int | No | Minimum popularity threshold |
| params | map[string]interface{} | No | |
| sort | []SortParamRequest | No | Sort parameters for activity selection |
AddActivityResponse
type AddActivityResponse struct {
Activity ActivityResponse `json:"activity,omitempty"`
Duration string `json:"duration,omitempty"`
MentionNotificationsCreated int `json:"mention_notifications_created,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The created activity |
| duration | string | Yes | |
| mention_notifications_created | int | No | Number of mention notification activities created for mentioned users |
AddBookmarkResponse
type AddBookmarkResponse struct {
Bookmark BookmarkResponse `json:"bookmark,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark | BookmarkResponse | Yes | The created bookmark |
| duration | string | Yes |
AddCommentBookmarkResponse
type AddCommentBookmarkResponse struct {
Bookmark BookmarkResponse `json:"bookmark,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark | BookmarkResponse | Yes | The created comment bookmark |
| duration | string | Yes |
AddCommentReactionResponse
type AddCommentReactionResponse struct {
Comment CommentResponse `json:"comment,omitempty"`
Duration string `json:"duration,omitempty"`
NotificationCreated bool `json:"notification_created,omitempty"`
Reaction FeedsReactionResponse `json:"reaction,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comment | CommentResponse | Yes | The comment the reaction was added to |
| duration | string | Yes | Duration of the request |
| reaction | FeedsReactionResponse | Yes | The created or updated reaction |
| notification_created | bool | No | Whether a notification activity was successfully created |
AddCommentRequest
type AddCommentRequest struct {
Attachments []Attachment `json:"attachments,omitempty"`
Comment string `json:"comment,omitempty"`
CopyCustomToNotification bool `json:"copy_custom_to_notification,omitempty"`
CreateNotificationActivity bool `json:"create_notification_activity,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
ForceModeration bool `json:"force_moderation,omitempty"`
Id string `json:"id,omitempty"`
MentionedUserIds []string `json:"mentioned_user_ids,omitempty"`
ObjectId string `json:"object_id,omitempty"`
ObjectType string `json:"object_type,omitempty"`
ParentId string `json:"parent_id,omitempty"`
SkipEnrichUrl bool `json:"skip_enrich_url,omitempty"`
SkipPush bool `json:"skip_push,omitempty"`
User UserRequest `json:"user,omitempty"`
UserId string `json:"user_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| attachments | []Attachment | No | Media attachments for the reply |
| comment | string | No | Text content of the comment |
| copy_custom_to_notification | bool | No | Whether to copy custom data to the notification activity (only applies when c... |
| create_notification_activity | bool | No | Whether to create a notification activity for this comment |
| custom | map[string]interface{} | No | Custom data for the comment |
| force_moderation | bool | No | If true, forces moderation to run for server-side requests. By default, serve... |
| id | string | No | Optional custom ID for the comment (max 255 characters). If not provided, a U... |
| mentioned_user_ids | []string | No | List of users mentioned in the reply |
| object_id | string | No | ID of the object to comment on. Required for root comments |
| object_type | string | No | Type of the object to comment on. Required for root comments |
| parent_id | string | No | ID of parent comment for replies. When provided, object_id and object_type ar... |
| skip_enrich_url | bool | No | Whether to skip URL enrichment for this comment |
| skip_push | bool | No | |
| user | UserRequest | No | |
| user_id | string | No |
AddCommentResponse
type AddCommentResponse struct {
Comment CommentResponse `json:"comment,omitempty"`
Duration string `json:"duration,omitempty"`
MentionNotificationsCreated int `json:"mention_notifications_created,omitempty"`
NotificationCreated bool `json:"notification_created,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comment | CommentResponse | Yes | The created comment |
| duration | string | Yes | |
| mention_notifications_created | int | No | Number of mention notification activities created for mentioned users |
| notification_created | bool | No | Whether a notification activity was successfully created |
AddCommentsBatchResponse
type AddCommentsBatchResponse struct {
Comments []CommentResponse `json:"comments,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comments | []CommentResponse | Yes | List of comments added |
| duration | string | Yes |
AddFolderRequest
type AddFolderRequest struct {
Custom map[string]interface{} `json:"custom,omitempty"`
Name string `json:"name,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Name of the folder |
| custom | map[string]interface{} | No | Custom data for the folder |
AddReactionResponse
type AddReactionResponse struct {
Activity ActivityResponse `json:"activity,omitempty"`
Duration string `json:"duration,omitempty"`
NotificationCreated bool `json:"notification_created,omitempty"`
Reaction FeedsReactionResponse `json:"reaction,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | |
| duration | string | Yes | |
| reaction | FeedsReactionResponse | Yes | The created reaction |
| notification_created | bool | No | Whether a notification activity was successfully created |
AggregatedActivityResponse
type AggregatedActivityResponse struct {
Activities []ActivityResponse `json:"activities,omitempty"`
ActivityCount int `json:"activity_count,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Group string `json:"group,omitempty"`
IsRead bool `json:"is_read,omitempty"`
IsSeen bool `json:"is_seen,omitempty"`
IsWatched bool `json:"is_watched,omitempty"`
Score float64 `json:"score,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
UserCount int `json:"user_count,omitempty"`
UserCountTruncated bool `json:"user_count_truncated,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activities | []ActivityResponse | Yes | List of activities in this aggregation |
| activity_count | int | Yes | Number of activities in this aggregation |
| created_at | float64 | Yes | When the aggregation was created |
| group | string | Yes | Grouping identifier |
| score | float64 | Yes | Ranking score for this aggregation |
| updated_at | float64 | Yes | When the aggregation was last updated |
| user_count | int | Yes | Number of unique users in this aggregation |
| user_count_truncated | bool | Yes | Whether this activity group has been truncated due to exceeding the group siz... |
| is_read | bool | No | Whether this aggregated group has been read. Only set for feed groups with no... |
| is_seen | bool | No | Whether this aggregated group has been seen. Only set for feed groups with no... |
| is_watched | bool | No |
AggregationConfig
type AggregationConfig struct {
ActivitiesSort string `json:"activities_sort,omitempty"`
Format string `json:"format,omitempty"`
ScoreStrategy string `json:"score_strategy,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activities_sort | string | No | Order of member activities inside each aggregated group for non-stories feeds... |
| format | string | No | Format for activity aggregation |
| score_strategy | string | No | Strategy for computing aggregated group scores from member activity scores wh... |
Attachment
An attachment is a message object that represents a file uploaded by a user.
type Attachment struct {
Actions []Action `json:"actions,omitempty"`
AssetUrl string `json:"asset_url,omitempty"`
AuthorIcon string `json:"author_icon,omitempty"`
AuthorLink string `json:"author_link,omitempty"`
AuthorName string `json:"author_name,omitempty"`
Color string `json:"color,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
Fallback string `json:"fallback,omitempty"`
Fields []Field `json:"fields,omitempty"`
Footer string `json:"footer,omitempty"`
FooterIcon string `json:"footer_icon,omitempty"`
Giphy Images `json:"giphy,omitempty"`
ImageUrl string `json:"image_url,omitempty"`
OgScrapeUrl string `json:"og_scrape_url,omitempty"`
OriginalHeight int `json:"original_height,omitempty"`
OriginalWidth int `json:"original_width,omitempty"`
Pretext string `json:"pretext,omitempty"`
Text string `json:"text,omitempty"`
ThumbUrl string `json:"thumb_url,omitempty"`
Title string `json:"title,omitempty"`
TitleLink string `json:"title_link,omitempty"`
Type string `json:"type,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | map[string]interface{} | Yes | |
| actions | []Action | No | |
| asset_url | string | No | |
| author_icon | string | No | |
| author_link | string | No | |
| author_name | string | No | |
| color | string | No | |
| fallback | string | No | |
| fields | []Field | No | |
| footer | string | No | |
| footer_icon | string | No | |
| giphy | Images | No | |
| image_url | string | No | |
| og_scrape_url | string | No | |
| original_height | int | No | |
| original_width | int | No | |
| pretext | string | No | |
| text | string | No | |
| thumb_url | string | No | |
| title | string | No | |
| title_link | string | No | |
| type | string | No | Attachment type (e.g. image, video, url) |
BookmarkFolderResponse
type BookmarkFolderResponse struct {
CreatedAt float64 `json:"created_at,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
Id string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
User UserResponse `json:"user,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float64 | Yes | When the folder was created |
| id | string | Yes | Unique identifier for the folder |
| name | string | Yes | Name of the folder |
| updated_at | float64 | Yes | When the folder was last updated |
| user | UserResponse | Yes | User who created the folder |
| custom | map[string]interface{} | No | Custom data for the folder |
BookmarkResponse
type BookmarkResponse struct {
Activity ActivityResponse `json:"activity,omitempty"`
ActivityId string `json:"activity_id,omitempty"`
Comment CommentResponse `json:"comment,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
Folder BookmarkFolderResponse `json:"folder,omitempty"`
ObjectId string `json:"object_id,omitempty"`
ObjectType string `json:"object_type,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
User UserResponse `json:"user,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The bookmarked activity (set when object_type is activity) |
| created_at | float64 | Yes | When the bookmark was created |
| object_id | string | Yes | ID of the bookmarked object |
| object_type | string | Yes | Type of the bookmarked object (activity or comment) |
| updated_at | float64 | Yes | When the bookmark was last updated |
| user | UserResponse | Yes | User who created the bookmark |
| activity_id | string | No | |
| comment | CommentResponse | No | The bookmarked comment (set when object_type is comment) |
| custom | map[string]interface{} | No | Custom data for the bookmark |
| folder | BookmarkFolderResponse | No | Folder containing this bookmark |
CollectionRequest
type CollectionRequest struct {
Custom map[string]interface{} `json:"custom,omitempty"`
Id string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
UserId string `json:"user_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | map[string]interface{} | Yes | Custom data for the collection (required, must contain at least one key) |
| name | string | Yes | Name/type of the collection |
| id | string | No | Unique identifier for the collection within its name (optional, will be auto-... |
| user_id | string | No | ID of the user who owns this collection |
CollectionResponse
type CollectionResponse struct {
CreatedAt float64 `json:"created_at,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
Id string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
UserId string `json:"user_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Unique identifier for the collection within its name |
| name | string | Yes | Name/type of the collection |
| created_at | float64 | No | When the collection was created |
| custom | map[string]interface{} | No | Custom data for the collection |
| updated_at | float64 | No | When the collection was last updated |
| user_id | string | No | ID of the user who owns this collection |
CommentResponse
type CommentResponse struct {
Attachments []Attachment `json:"attachments,omitempty"`
BookmarkCount int `json:"bookmark_count,omitempty"`
ConfidenceScore float64 `json:"confidence_score,omitempty"`
ControversyScore float64 `json:"controversy_score,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
DeletedAt float64 `json:"deleted_at,omitempty"`
DownvoteCount int `json:"downvote_count,omitempty"`
EditedAt float64 `json:"edited_at,omitempty"`
Id string `json:"id,omitempty"`
LatestReactions []FeedsReactionResponse `json:"latest_reactions,omitempty"`
MentionedUsers []UserResponse `json:"mentioned_users,omitempty"`
Moderation ModerationV2Response `json:"moderation,omitempty"`
ObjectId string `json:"object_id,omitempty"`
ObjectType string `json:"object_type,omitempty"`
OwnReactions []FeedsReactionResponse `json:"own_reactions,omitempty"`
ParentId string `json:"parent_id,omitempty"`
ReactionCount int `json:"reaction_count,omitempty"`
ReactionGroups map[string]interface{} `json:"reaction_groups,omitempty"`
ReplyCount int `json:"reply_count,omitempty"`
Score int `json:"score,omitempty"`
Status string `json:"status,omitempty"`
Text string `json:"text,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
UpvoteCount int `json:"upvote_count,omitempty"`
User UserResponse `json:"user,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark_count | int | Yes | |
| confidence_score | float64 | Yes | Confidence score of the comment |
| created_at | float64 | Yes | When the comment was created |
| downvote_count | int | Yes | Number of downvotes for this comment |
| id | string | Yes | Unique identifier for the comment |
| mentioned_users | []UserResponse | Yes | Users mentioned in the comment |
| object_id | string | Yes | ID of the object this comment is associated with |
| object_type | string | Yes | Type of the object this comment is associated with |
| own_reactions | []FeedsReactionResponse | Yes | Current user's reactions to this activity |
| reaction_count | int | Yes | Number of reactions to this comment |
| reply_count | int | Yes | Number of replies to this comment |
| score | int | Yes | Score of the comment based on reactions |
| status | string | Yes | Status of the comment. One of: active, deleted, removed, hidden |
| updated_at | float64 | Yes | When the comment was last updated |
| upvote_count | int | Yes | Number of upvotes for this comment |
| user | UserResponse | Yes | User who created the comment |
| attachments | []Attachment | No | Attachments associated with the comment |
| controversy_score | float64 | No | Controversy score of the comment |
| custom | map[string]interface{} | No | Custom data for the comment |
| deleted_at | float64 | No | When the comment was deleted |
| edited_at | float64 | No | When the comment was last edited |
| latest_reactions | []FeedsReactionResponse | No | Recent reactions to the comment |
| moderation | ModerationV2Response | No | Moderation details for the comment |
| parent_id | string | No | ID of parent comment for nested replies |
| reaction_groups | map[string]interface{} | No | Grouped reactions by type |
| text | string | No | Text content of the comment |
CreateCollectionsResponse
type CreateCollectionsResponse struct {
Collections []CollectionResponse `json:"collections,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| collections | []CollectionResponse | Yes | List of created collections |
| duration | string | Yes |
CreateFeedGroupResponse
type CreateFeedGroupResponse struct {
Duration string `json:"duration,omitempty"`
FeedGroup FeedGroupResponse `json:"feed_group,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| feed_group | FeedGroupResponse | Yes | The upserted feed group |
CreateFeedViewResponse
type CreateFeedViewResponse struct {
Duration string `json:"duration,omitempty"`
FeedView FeedViewResponse `json:"feed_view,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| feed_view | FeedViewResponse | Yes | The created feed view |
CreateFeedsBatchResponse
type CreateFeedsBatchResponse struct {
Duration string `json:"duration,omitempty"`
Feeds []FeedResponse `json:"feeds,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| feeds | []FeedResponse | Yes | List of created feeds |
CreateMembershipLevelResponse
type CreateMembershipLevelResponse struct {
Duration string `json:"duration,omitempty"`
MembershipLevel MembershipLevelResponse `json:"membership_level,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| membership_level | MembershipLevelResponse | Yes | The created membership level |
DailyMetricStatsResponse
type DailyMetricStatsResponse struct {
Daily []DailyMetricResponse `json:"daily,omitempty"`
Total int `json:"total,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| daily | []DailyMetricResponse | Yes | Array of daily metric values |
| total | int | Yes | Total value across all days in the date range |
Data
type Data struct {
Id string `json:"id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes |
DeleteActivitiesResponse
type DeleteActivitiesResponse struct {
DeletedIds []string `json:"deleted_ids,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| deleted_ids | []string | Yes | List of activity IDs that were successfully deleted |
| duration | string | Yes |
DeleteActivityReactionResponse
type DeleteActivityReactionResponse struct {
Activity ActivityResponse `json:"activity,omitempty"`
Duration string `json:"duration,omitempty"`
Reaction FeedsReactionResponse `json:"reaction,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | |
| duration | string | Yes | |
| reaction | FeedsReactionResponse | Yes |
DeleteActivityResponse
type DeleteActivityResponse struct {
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes |
DeleteBookmarkFolderResponse
type DeleteBookmarkFolderResponse struct {
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes |
DeleteBookmarkResponse
type DeleteBookmarkResponse struct {
Bookmark BookmarkResponse `json:"bookmark,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark | BookmarkResponse | Yes | The deleted bookmark |
| duration | string | Yes |
DeleteCollectionsResponse
type DeleteCollectionsResponse struct {
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes |
DeleteCommentBookmarkResponse
type DeleteCommentBookmarkResponse struct {
Bookmark BookmarkResponse `json:"bookmark,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark | BookmarkResponse | Yes | The deleted comment bookmark |
| duration | string | Yes |
DeleteCommentReactionResponse
type DeleteCommentReactionResponse struct {
Comment CommentResponse `json:"comment,omitempty"`
Duration string `json:"duration,omitempty"`
Reaction FeedsReactionResponse `json:"reaction,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comment | CommentResponse | Yes | The comment after reaction removal |
| duration | string | Yes | |
| reaction | FeedsReactionResponse | Yes | The removed reaction |
DeleteCommentResponse
type DeleteCommentResponse struct {
Activity ActivityResponse `json:"activity,omitempty"`
Comment CommentResponse `json:"comment,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The parent activity |
| comment | CommentResponse | Yes | The deleted comment |
| duration | string | Yes |
DeleteFeedGroupResponse
Basic response information
type DeleteFeedGroupResponse struct {
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
DeleteFeedResponse
type DeleteFeedResponse struct {
Duration string `json:"duration,omitempty"`
TaskId string `json:"task_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| task_id | string | Yes | The ID of the async task that will handle feed cleanup and hard deletion |
DeleteFeedUserDataResponse
Response for deleting feed user data
type DeleteFeedUserDataResponse struct {
Duration string `json:"duration,omitempty"`
TaskId string `json:"task_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| task_id | string | Yes | The task ID for the deletion task |
DeleteFeedViewResponse
type DeleteFeedViewResponse struct {
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes |
DeleteFeedsBatchResponse
type DeleteFeedsBatchResponse struct {
Duration string `json:"duration,omitempty"`
TaskId string `json:"task_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| task_id | string | Yes | The ID of the async task that will handle feed cleanup and hard deletion |
EMAUStatsResponse
type EMAUStatsResponse struct {
Daily []DailyMetricResponse `json:"daily,omitempty"`
Last30Days []DailyMetricResponse `json:"last_30_days,omitempty"`
MonthToDate []DailyMetricResponse `json:"month_to_date,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| daily | []DailyMetricResponse | Yes | Per-day unique engaged user counts |
| last_30_days | []DailyMetricResponse | Yes | Rolling 30-day engaged user count snapshots |
| month_to_date | []DailyMetricResponse | Yes | Calendar month-to-date engaged user count snapshots |
EnrichmentOptions
Options to skip specific enrichments to improve performance. Default is false (enrichments are included). Setting a field to true skips that enrichment.
type EnrichmentOptions struct {
EnrichOwnFollowings bool `json:"enrich_own_followings,omitempty"`
IncludeScoreVars bool `json:"include_score_vars,omitempty"`
SkipActivity bool `json:"skip_activity,omitempty"`
SkipActivityCollections bool `json:"skip_activity_collections,omitempty"`
SkipActivityComments bool `json:"skip_activity_comments,omitempty"`
SkipActivityCurrentFeed bool `json:"skip_activity_current_feed,omitempty"`
SkipActivityMentionedUsers bool `json:"skip_activity_mentioned_users,omitempty"`
SkipActivityOwnBookmarks bool `json:"skip_activity_own_bookmarks,omitempty"`
SkipActivityParents bool `json:"skip_activity_parents,omitempty"`
SkipActivityPoll bool `json:"skip_activity_poll,omitempty"`
SkipActivityReactions bool `json:"skip_activity_reactions,omitempty"`
SkipActivityRefreshImageUrls bool `json:"skip_activity_refresh_image_urls,omitempty"`
SkipAll bool `json:"skip_all,omitempty"`
SkipFeedMemberUser bool `json:"skip_feed_member_user,omitempty"`
SkipFollowers bool `json:"skip_followers,omitempty"`
SkipFollowing bool `json:"skip_following,omitempty"`
SkipOwnCapabilities bool `json:"skip_own_capabilities,omitempty"`
SkipOwnFollows bool `json:"skip_own_follows,omitempty"`
SkipPins bool `json:"skip_pins,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| enrich_own_followings | bool | No | Default: false. When true, includes fetching and enriching own_followings (fo... |
| include_score_vars | bool | No | Default: false. When true, includes score_vars in activity responses containi... |
| skip_activity | bool | No | Default: false. When true, skips all activity enrichments. |
| skip_activity_collections | bool | No | Default: false. When true, skips enriching collections on activities. |
| skip_activity_comments | bool | No | Default: false. When true, skips enriching comments on activities. |
| skip_activity_current_feed | bool | No | Default: false. When true, skips enriching current_feed on activities. Note: ... |
| skip_activity_mentioned_users | bool | No | Default: false. When true, skips enriching mentioned users on activities. |
| skip_activity_own_bookmarks | bool | No | Default: false. When true, skips enriching own bookmarks on activities. |
| skip_activity_parents | bool | No | Default: false. When true, skips enriching parent activities. |
| skip_activity_poll | bool | No | Default: false. When true, skips enriching poll data on activities. |
| skip_activity_reactions | bool | No | Default: false. When true, skips fetching and enriching latest and own reacti... |
| skip_activity_refresh_image_urls | bool | No | Default: false. When true, skips refreshing image URLs on activities. |
| skip_all | bool | No | Default: false. When true, skips all enrichments. |
| skip_feed_member_user | bool | No | Default: false. When true, skips enriching user data on feed members. |
| skip_followers | bool | No | Default: false. When true, skips fetching and enriching followers. Note: If f... |
| skip_following | bool | No | Default: false. When true, skips fetching and enriching following. Note: If f... |
| skip_own_capabilities | bool | No | Default: false. When true, skips computing and including capabilities for feeds. |
| skip_own_follows | bool | No | Default: false. When true, skips fetching and enriching own_follows (follows ... |
| skip_pins | bool | No | Default: false. When true, skips enriching pinned activities. |
ExportFeedUserDataResponse
Response for exporting feed user data
type ExportFeedUserDataResponse struct {
Duration string `json:"duration,omitempty"`
TaskId string `json:"task_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| task_id | string | Yes | The task ID for the export task |
FeedGroup
type FeedGroup struct {
ActivityProcessors []ActivityProcessorConfig `json:"activity_processors,omitempty"`
ActivitySelectors []ActivitySelectorConfig `json:"activity_selectors,omitempty"`
Aggregation AggregationConfig `json:"aggregation,omitempty"`
AggregationVersion int `json:"aggregation_version,omitempty"`
AppPk int `json:"app_pk,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
DefaultVisibility string `json:"default_visibility,omitempty"`
DeletedAt float64 `json:"deleted_at,omitempty"`
GroupId string `json:"group_id,omitempty"`
LastFeedGetAt float64 `json:"last_feed_get_at,omitempty"`
Notification NotificationConfig `json:"notification,omitempty"`
PushNotification PushNotificationConfig `json:"push_notification,omitempty"`
Ranking RankingConfig `json:"ranking,omitempty"`
Stories StoriesConfig `json:"stories,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_processors | []ActivityProcessorConfig | Yes | |
| activity_selectors | []ActivitySelectorConfig | Yes | |
| aggregation_version | int | Yes | |
| app_pk | int | Yes | |
| created_at | float64 | Yes | |
| custom | map[string]interface{} | Yes | |
| default_visibility | string | Yes | |
| group_id | string | Yes | |
| updated_at | float64 | Yes | |
| aggregation | AggregationConfig | No | |
| deleted_at | float64 | No | |
| last_feed_get_at | float64 | No | |
| notification | NotificationConfig | No | |
| push_notification | PushNotificationConfig | No | |
| ranking | RankingConfig | No | |
| stories | StoriesConfig | No |
FeedGroupResponse
type FeedGroupResponse struct {
ActivityProcessors []ActivityProcessorConfig `json:"activity_processors,omitempty"`
ActivitySelectors []ActivitySelectorConfigResponse `json:"activity_selectors,omitempty"`
Aggregation AggregationConfig `json:"aggregation,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
DefaultVisibility string `json:"default_visibility,omitempty"`
DeletedAt float64 `json:"deleted_at,omitempty"`
Id string `json:"id,omitempty"`
Notification NotificationConfig `json:"notification,omitempty"`
PushNotification PushNotificationConfig `json:"push_notification,omitempty"`
Ranking RankingConfig `json:"ranking,omitempty"`
Stories StoriesConfig `json:"stories,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float64 | Yes | When the feed group was created |
| id | string | Yes | Identifier within the group |
| updated_at | float64 | Yes | When the feed group was last updated |
| activity_processors | []ActivityProcessorConfig | No | Configuration for activity processors |
| activity_selectors | []ActivitySelectorConfigResponse | No | Configuration for activity selectors |
| aggregation | AggregationConfig | No | Configuration for activity aggregation |
| custom | map[string]interface{} | No | Custom data for the feed group |
| default_visibility | string | No | Default visibility for activities. One of: public, visible, followers, member... |
| deleted_at | float64 | No | |
| notification | NotificationConfig | No | Configuration for notifications |
| push_notification | PushNotificationConfig | No | Configuration for push notifications |
| ranking | RankingConfig | No | Configuration for activity ranking |
| stories | StoriesConfig | No | Configuration for stories feature |
FeedInput
type FeedInput struct {
Custom map[string]interface{} `json:"custom,omitempty"`
Description string `json:"description,omitempty"`
FilterTags []string `json:"filter_tags,omitempty"`
Location Location `json:"location,omitempty"`
Members []FeedMemberRequest `json:"members,omitempty"`
Name string `json:"name,omitempty"`
Visibility string `json:"visibility,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | map[string]interface{} | No | |
| description | string | No | |
| filter_tags | []string | No | |
| location | Location | No | |
| members | []FeedMemberRequest | No | |
| name | string | No | |
| visibility | string | No |
FeedMemberRequest
type FeedMemberRequest struct {
Custom map[string]interface{} `json:"custom,omitempty"`
Invite bool `json:"invite,omitempty"`
MembershipLevel string `json:"membership_level,omitempty"`
Role string `json:"role,omitempty"`
UserId string `json:"user_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| user_id | string | Yes | ID of the user to add as a member |
| custom | map[string]interface{} | No | Custom data for the member |
| invite | bool | No | Whether this is an invite to become a member |
| membership_level | string | No | ID of the membership level to assign to the member |
| role | string | No | Role of the member in the feed |
FeedMemberResponse
type FeedMemberResponse struct {
CreatedAt float64 `json:"created_at,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
InviteAcceptedAt float64 `json:"invite_accepted_at,omitempty"`
InviteRejectedAt float64 `json:"invite_rejected_at,omitempty"`
MembershipLevel MembershipLevelResponse `json:"membership_level,omitempty"`
Role string `json:"role,omitempty"`
Status string `json:"status,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
User UserResponse `json:"user,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float64 | Yes | When the membership was created |
| role | string | Yes | Role of the member in the feed |
| status | string | Yes | Status of the membership. One of: member, pending, rejected |
| updated_at | float64 | Yes | When the membership was last updated |
| user | UserResponse | Yes | User who is a member |
| custom | map[string]interface{} | No | Custom data for the membership |
| invite_accepted_at | float64 | No | When the invite was accepted |
| invite_rejected_at | float64 | No | When the invite was rejected |
| membership_level | MembershipLevelResponse | No | Membership level assigned to the member |
FeedRequest
type FeedRequest struct {
CreatedById string `json:"created_by_id,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
Description string `json:"description,omitempty"`
FeedGroupId string `json:"feed_group_id,omitempty"`
FeedId string `json:"feed_id,omitempty"`
FilterTags []string `json:"filter_tags,omitempty"`
Location Location `json:"location,omitempty"`
Members []FeedMemberRequest `json:"members,omitempty"`
Name string `json:"name,omitempty"`
Visibility string `json:"visibility,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| feed_group_id | string | Yes | ID of the feed group |
| feed_id | string | Yes | ID of the feed |
| created_by_id | string | No | ID of the feed creator |
| custom | map[string]interface{} | No | Custom data for the feed |
| description | string | No | Description of the feed |
| filter_tags | []string | No | Tags used for filtering feeds |
| location | Location | No | Geographic location for the feed |
| members | []FeedMemberRequest | No | Initial members for the feed |
| name | string | No | Name of the feed |
| visibility | string | No | Visibility setting for the feed. One of: public, visible, followers, members,... |
FeedResponse
type FeedResponse struct {
ActivityCount int `json:"activity_count,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
CreatedBy UserResponse `json:"created_by,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
DeletedAt float64 `json:"deleted_at,omitempty"`
Description string `json:"description,omitempty"`
Feed string `json:"feed,omitempty"`
FilterTags []string `json:"filter_tags,omitempty"`
FollowerCount int `json:"follower_count,omitempty"`
FollowingCount int `json:"following_count,omitempty"`
GroupId string `json:"group_id,omitempty"`
Id string `json:"id,omitempty"`
Location Location `json:"location,omitempty"`
MemberCount int `json:"member_count,omitempty"`
Name string `json:"name,omitempty"`
OwnCapabilities []FeedOwnCapability `json:"own_capabilities,omitempty"`
OwnFollowings []FollowResponse `json:"own_followings,omitempty"`
OwnFollows []FollowResponse `json:"own_follows,omitempty"`
OwnMembership FeedMemberResponse `json:"own_membership,omitempty"`
PinCount int `json:"pin_count,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
Visibility string `json:"visibility,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_count | int | Yes | |
| created_at | float64 | Yes | When the feed was created |
| created_by | UserResponse | Yes | User who created the feed |
| description | string | Yes | Description of the feed |
| feed | string | Yes | Fully qualified feed ID (group_id:id) |
| follower_count | int | Yes | Number of followers of this feed |
| following_count | int | Yes | Number of feeds this feed follows |
| group_id | string | Yes | Group this feed belongs to |
| id | string | Yes | Unique identifier for the feed |
| member_count | int | Yes | Number of members in this feed |
| name | string | Yes | Name of the feed |
| pin_count | int | Yes | Number of pinned activities in this feed |
| updated_at | float64 | Yes | When the feed was last updated |
| custom | map[string]interface{} | No | Custom data for the feed |
| deleted_at | float64 | No | When the feed was deleted |
| filter_tags | []string | No | Tags used for filtering feeds |
| location | Location | No | Geographic location for the feed |
| own_capabilities | []FeedOwnCapability | No | Capabilities the current user has for this feed |
| own_followings | []FollowResponse | No | Follow relationships where the feed owner’s feeds are following the current... |
| own_follows | []FollowResponse | No | Follow relationships where the current user's feeds are following this feed |
| own_membership | FeedMemberResponse | No | Membership information for the current user in this feed |
| visibility | string | No | Visibility setting for the feed |
FeedSuggestionResponse
type FeedSuggestionResponse struct {
ActivityCount int `json:"activity_count,omitempty"`
AlgorithmScores map[string]interface{} `json:"algorithm_scores,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
CreatedBy UserResponse `json:"created_by,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
DeletedAt float64 `json:"deleted_at,omitempty"`
Description string `json:"description,omitempty"`
Feed string `json:"feed,omitempty"`
FilterTags []string `json:"filter_tags,omitempty"`
FollowerCount int `json:"follower_count,omitempty"`
FollowingCount int `json:"following_count,omitempty"`
GroupId string `json:"group_id,omitempty"`
Id string `json:"id,omitempty"`
Location Location `json:"location,omitempty"`
MemberCount int `json:"member_count,omitempty"`
Name string `json:"name,omitempty"`
OwnCapabilities []FeedOwnCapability `json:"own_capabilities,omitempty"`
OwnFollowings []FollowResponse `json:"own_followings,omitempty"`
OwnFollows []FollowResponse `json:"own_follows,omitempty"`
OwnMembership FeedMemberResponse `json:"own_membership,omitempty"`
PinCount int `json:"pin_count,omitempty"`
Reason string `json:"reason,omitempty"`
RecommendationScore float64 `json:"recommendation_score,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
Visibility string `json:"visibility,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_count | int | Yes | |
| created_at | float64 | Yes | When the feed was created |
| created_by | UserResponse | Yes | User who created the feed |
| description | string | Yes | Description of the feed |
| feed | string | Yes | Fully qualified feed ID (group_id:id) |
| follower_count | int | Yes | Number of followers of this feed |
| following_count | int | Yes | Number of feeds this feed follows |
| group_id | string | Yes | Group this feed belongs to |
| id | string | Yes | Unique identifier for the feed |
| member_count | int | Yes | Number of members in this feed |
| name | string | Yes | Name of the feed |
| pin_count | int | Yes | Number of pinned activities in this feed |
| updated_at | float64 | Yes | When the feed was last updated |
| algorithm_scores | map[string]interface{} | No | |
| custom | map[string]interface{} | No | Custom data for the feed |
| deleted_at | float64 | No | When the feed was deleted |
| filter_tags | []string | No | Tags used for filtering feeds |
| location | Location | No | Geographic location for the feed |
| own_capabilities | []FeedOwnCapability | No | Capabilities the current user has for this feed |
| own_followings | []FollowResponse | No | Follow relationships where the feed owner’s feeds are following the current... |
| own_follows | []FollowResponse | No | Follow relationships where the current user's feeds are following this feed |
| own_membership | FeedMemberResponse | No | Membership information for the current user in this feed |
| reason | string | No | |
| recommendation_score | float64 | No | |
| visibility | string | No | Visibility setting for the feed |
FeedViewResponse
type FeedViewResponse struct {
ActivitySelectors []ActivitySelectorConfigResponse `json:"activity_selectors,omitempty"`
Aggregation AggregationConfig `json:"aggregation,omitempty"`
Id string `json:"id,omitempty"`
LastUsedAt float64 `json:"last_used_at,omitempty"`
Ranking RankingConfig `json:"ranking,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Unique identifier for the custom feed view |
| activity_selectors | []ActivitySelectorConfigResponse | No | Configured activity selectors |
| aggregation | AggregationConfig | No | Configuration for activity aggregation |
| last_used_at | float64 | No | When the feed view was last used |
| ranking | RankingConfig | No | Configuration for activity ranking |
FeedVisibilityResponse
type FeedVisibilityResponse struct {
Grants map[string]interface{} `json:"grants,omitempty"`
Name string `json:"name,omitempty"`
Permissions []Permission `json:"permissions,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| grants | map[string]interface{} | Yes | Permission grants for each role |
| name | string | Yes | Name of the feed visibility level |
| permissions | []Permission | Yes | List of permission policies |
FeedsReactionResponse
type FeedsReactionResponse struct {
ActivityId string `json:"activity_id,omitempty"`
CommentId string `json:"comment_id,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
Type string `json:"type,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
User UserResponse `json:"user,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_id | string | Yes | ID of the activity that was reacted to |
| created_at | float64 | Yes | When the reaction was created |
| type | string | Yes | Type of reaction |
| updated_at | float64 | Yes | When the reaction was last updated |
| user | UserResponse | Yes | User who created the reaction |
| comment_id | string | No | ID of the comment that was reacted to |
| custom | map[string]interface{} | No | Custom data for the reaction |
Field
type Field struct {
Short bool `json:"short,omitempty"`
Title string `json:"title,omitempty"`
Value string `json:"value,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| short | bool | Yes | |
| title | string | Yes | |
| value | string | Yes |
FollowBatchResponse
type FollowBatchResponse struct {
Created []FollowResponse `json:"created,omitempty"`
Duration string `json:"duration,omitempty"`
Follows []FollowResponse `json:"follows,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created | []FollowResponse | Yes | List of newly created follow relationships |
| duration | string | Yes | |
| follows | []FollowResponse | Yes | List of current follow relationships |
FollowRequest
type FollowRequest struct {
ActivityCopyLimit int `json:"activity_copy_limit,omitempty"`
CopyCustomToNotification bool `json:"copy_custom_to_notification,omitempty"`
CreateNotificationActivity bool `json:"create_notification_activity,omitempty"`
CreateUsers bool `json:"create_users,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
EnrichOwnFields bool `json:"enrich_own_fields,omitempty"`
PushPreference string `json:"push_preference,omitempty"`
SkipPush bool `json:"skip_push,omitempty"`
Source string `json:"source,omitempty"`
Status string `json:"status,omitempty"`
Target string `json:"target,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| source | string | Yes | Fully qualified ID of the source feed |
| target | string | Yes | Fully qualified ID of the target feed |
| activity_copy_limit | int | No | Maximum number of historical activities to copy from the target feed when the... |
| copy_custom_to_notification | bool | No | Whether to copy custom data to the notification activity (only applies when c... |
| create_notification_activity | bool | No | Whether to create a notification activity for this follow |
| create_users | bool | No | If true, auto-creates users referenced by the source and target FIDs when the... |
| custom | map[string]interface{} | No | Custom data for the follow relationship |
| enrich_own_fields | bool | No | If true, enriches the follow's source_feed and target_feed with own_* fields ... |
| push_preference | string | No | Push preference for the follow relationship |
| skip_push | bool | No | Whether to skip push for this follow |
| status | string | No | Status of the follow relationship. One of: accepted, pending, rejected |
FollowResponse
type FollowResponse struct {
CreatedAt float64 `json:"created_at,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
FollowerRole string `json:"follower_role,omitempty"`
PushPreference string `json:"push_preference,omitempty"`
RequestAcceptedAt float64 `json:"request_accepted_at,omitempty"`
RequestRejectedAt float64 `json:"request_rejected_at,omitempty"`
SourceFeed FeedResponse `json:"source_feed,omitempty"`
Status string `json:"status,omitempty"`
TargetFeed FeedResponse `json:"target_feed,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float64 | Yes | When the follow relationship was created |
| follower_role | string | Yes | Role of the follower (source user) in the follow relationship |
| push_preference | string | Yes | Push preference for notifications. One of: all, none |
| source_feed | FeedResponse | Yes | Source feed object |
| status | string | Yes | Status of the follow relationship. One of: accepted, pending, rejected |
| target_feed | FeedResponse | Yes | Target feed object |
| updated_at | float64 | Yes | When the follow relationship was last updated |
| custom | map[string]interface{} | No | Custom data for the follow relationship |
| request_accepted_at | float64 | No | When the follow request was accepted |
| request_rejected_at | float64 | No | When the follow request was rejected |
FriendReactionsOptions
Options to control fetching reactions from friends (users you follow or have mutual follows with).
type FriendReactionsOptions struct {
Enabled bool `json:"enabled,omitempty"`
Limit int `json:"limit,omitempty"`
Type string `json:"type,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| enabled | bool | No | Default: false. When true, fetches friend reactions for activities. |
| limit | int | No | Default: 3, Max: 10. The maximum number of friend reactions to return per act... |
| type | string | No | Default: 'following'. The type of friend relationship to use. 'following' = u... |
GetActivityResponse
type GetActivityResponse struct {
Activity ActivityResponse `json:"activity,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The requested activity |
| duration | string | Yes |
GetCommentRepliesResponse
type GetCommentRepliesResponse struct {
Comments []ThreadedCommentResponse `json:"comments,omitempty"`
Duration string `json:"duration,omitempty"`
Next string `json:"next,omitempty"`
Prev string `json:"prev,omitempty"`
Sort string `json:"sort,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comments | []ThreadedCommentResponse | Yes | Threaded listing of replies to the comment |
| duration | string | Yes | |
| sort | string | Yes | Sort order used for the replies (first, last, top, best, controversial) |
| next | string | No | |
| prev | string | No |
GetCommentResponse
type GetCommentResponse struct {
Comment CommentResponse `json:"comment,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comment | CommentResponse | Yes | Comment |
| duration | string | Yes |
GetCommentsResponse
type GetCommentsResponse struct {
Comments []ThreadedCommentResponse `json:"comments,omitempty"`
Duration string `json:"duration,omitempty"`
Next string `json:"next,omitempty"`
Prev string `json:"prev,omitempty"`
Sort string `json:"sort,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comments | []ThreadedCommentResponse | Yes | Threaded listing for the activity |
| duration | string | Yes | |
| sort | string | Yes | Sort order used for the comments (first, last, top, best, controversial) |
| next | string | No | |
| prev | string | No |
GetFeedGroupResponse
type GetFeedGroupResponse struct {
Duration string `json:"duration,omitempty"`
FeedGroup FeedGroupResponse `json:"feed_group,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| feed_group | FeedGroupResponse | Yes | The requested feed group |
GetFeedViewResponse
type GetFeedViewResponse struct {
Duration string `json:"duration,omitempty"`
FeedView FeedViewResponse `json:"feed_view,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| feed_view | FeedViewResponse | Yes | The requested feed view |
GetFeedVisibilityResponse
type GetFeedVisibilityResponse struct {
Duration string `json:"duration,omitempty"`
FeedVisibility FeedVisibilityResponse `json:"feed_visibility,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| feed_visibility | FeedVisibilityResponse | Yes | Feed visibility configuration and permissions |
GetFeedsRateLimitsResponse
type GetFeedsRateLimitsResponse struct {
Android map[string]interface{} `json:"android,omitempty"`
Duration string `json:"duration,omitempty"`
Ios map[string]interface{} `json:"ios,omitempty"`
ServerSide map[string]interface{} `json:"server_side,omitempty"`
Web map[string]interface{} `json:"web,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| android | map[string]interface{} | No | Rate limits for Android platform (endpoint name -> limit info) |
| ios | map[string]interface{} | No | Rate limits for iOS platform (endpoint name -> limit info) |
| server_side | map[string]interface{} | No | Rate limits for server-side platform (endpoint name -> limit info) |
| web | map[string]interface{} | No | Rate limits for Web platform (endpoint name -> limit info) |
GetFollowSuggestionsResponse
type GetFollowSuggestionsResponse struct {
AlgorithmUsed string `json:"algorithm_used,omitempty"`
Duration string `json:"duration,omitempty"`
Suggestions []FeedSuggestionResponse `json:"suggestions,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| suggestions | []FeedSuggestionResponse | Yes | List of suggested feeds to follow |
| algorithm_used | string | No |
GetOrCreateFeedGroupResponse
type GetOrCreateFeedGroupResponse struct {
Duration string `json:"duration,omitempty"`
FeedGroup FeedGroupResponse `json:"feed_group,omitempty"`
WasCreated bool `json:"was_created,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| feed_group | FeedGroupResponse | Yes | The feed group that was retrieved or created |
| was_created | bool | Yes | Indicates whether the feed group was created (true) or already existed (false) |
GetOrCreateFeedResponse
Basic response information
type GetOrCreateFeedResponse struct {
Activities []ActivityResponse `json:"activities,omitempty"`
AggregatedActivities []AggregatedActivityResponse `json:"aggregated_activities,omitempty"`
Created bool `json:"created,omitempty"`
Duration string `json:"duration,omitempty"`
Feed FeedResponse `json:"feed,omitempty"`
Followers []FollowResponse `json:"followers,omitempty"`
FollowersPagination PagerResponse `json:"followers_pagination,omitempty"`
Following []FollowResponse `json:"following,omitempty"`
FollowingPagination PagerResponse `json:"following_pagination,omitempty"`
MemberPagination PagerResponse `json:"member_pagination,omitempty"`
Members []FeedMemberResponse `json:"members,omitempty"`
Next string `json:"next,omitempty"`
NotificationStatus NotificationStatusResponse `json:"notification_status,omitempty"`
PinnedActivities []ActivityPinResponse `json:"pinned_activities,omitempty"`
Prev string `json:"prev,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activities | []ActivityResponse | Yes | |
| aggregated_activities | []AggregatedActivityResponse | Yes | |
| created | bool | Yes | |
| duration | string | Yes | Duration of the request in milliseconds |
| feed | FeedResponse | Yes | |
| followers | []FollowResponse | Yes | |
| following | []FollowResponse | Yes | |
| members | []FeedMemberResponse | Yes | |
| pinned_activities | []ActivityPinResponse | Yes | |
| followers_pagination | PagerResponse | No | |
| following_pagination | PagerResponse | No | |
| member_pagination | PagerResponse | No | |
| next | string | No | |
| notification_status | NotificationStatusResponse | No | |
| prev | string | No |
GetOrCreateFeedViewResponse
type GetOrCreateFeedViewResponse struct {
Duration string `json:"duration,omitempty"`
FeedView FeedViewResponse `json:"feed_view,omitempty"`
WasCreated bool `json:"was_created,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| feed_view | FeedViewResponse | Yes | The feed view (either existing or newly created) |
| was_created | bool | Yes | Indicates whether the feed view was newly created (true) or already existed (... |
Images
type Images struct {
FixedHeight ImageData `json:"fixed_height,omitempty"`
FixedHeightDownsampled ImageData `json:"fixed_height_downsampled,omitempty"`
FixedHeightStill ImageData `json:"fixed_height_still,omitempty"`
FixedWidth ImageData `json:"fixed_width,omitempty"`
FixedWidthDownsampled ImageData `json:"fixed_width_downsampled,omitempty"`
FixedWidthStill ImageData `json:"fixed_width_still,omitempty"`
Original ImageData `json:"original,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| fixed_height | ImageData | Yes | |
| fixed_height_downsampled | ImageData | Yes | |
| fixed_height_still | ImageData | Yes | |
| fixed_width | ImageData | Yes | |
| fixed_width_downsampled | ImageData | Yes | |
| fixed_width_still | ImageData | Yes | |
| original | ImageData | Yes |
ListFeedGroupsResponse
Basic response information
type ListFeedGroupsResponse struct {
Duration string `json:"duration,omitempty"`
Groups map[string]interface{} `json:"groups,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| groups | map[string]interface{} | Yes |
ListFeedViewsResponse
type ListFeedViewsResponse struct {
Duration string `json:"duration,omitempty"`
Views map[string]interface{} `json:"views,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| views | map[string]interface{} | Yes | Map of feed view ID to feed view |
ListFeedVisibilitiesResponse
type ListFeedVisibilitiesResponse struct {
Duration string `json:"duration,omitempty"`
FeedVisibilities map[string]interface{} `json:"feed_visibilities,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| feed_visibilities | map[string]interface{} | Yes | Map of feed visibility configurations by name |
Location
type Location struct {
Lat float64 `json:"lat,omitempty"`
Lng float64 `json:"lng,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| lat | float64 | Yes | Latitude coordinate |
| lng | float64 | Yes | Longitude coordinate |
MembershipLevelResponse
type MembershipLevelResponse struct {
CreatedAt float64 `json:"created_at,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
Description string `json:"description,omitempty"`
Id string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Priority int `json:"priority,omitempty"`
Tags []string `json:"tags,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float64 | Yes | When the membership level was created |
| id | string | Yes | Unique identifier for the membership level |
| name | string | Yes | Display name for the membership level |
| priority | int | Yes | Priority level |
| tags | []string | Yes | Activity tags this membership level gives access to |
| updated_at | float64 | Yes | When the membership level was last updated |
| custom | map[string]interface{} | No | Custom data for the membership level |
| description | string | No | Description of the membership level |
NotificationConfig
type NotificationConfig struct {
DeduplicationWindow string `json:"deduplication_window,omitempty"`
TrackRead bool `json:"track_read,omitempty"`
TrackSeen bool `json:"track_seen,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| deduplication_window | string | No | Time window for deduplicating notification activities (reactions and follows)... |
| track_read | bool | No | Whether to track read status |
| track_seen | bool | No | Whether to track seen status |
NotificationStatusResponse
type NotificationStatusResponse struct {
LastReadAt float64 `json:"last_read_at,omitempty"`
LastSeenAt float64 `json:"last_seen_at,omitempty"`
ReadActivities []string `json:"read_activities,omitempty"`
SeenActivities []string `json:"seen_activities,omitempty"`
Unread int `json:"unread,omitempty"`
Unseen int `json:"unseen,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| unread | int | Yes | Number of unread notifications |
| unseen | int | Yes | Number of unseen notifications |
| last_read_at | float64 | No | When notifications were last read |
| last_seen_at | float64 | No | When notifications were last seen |
| read_activities | []string | No | Deprecated: use is_read on each activity/group instead. IDs of activities tha... |
| seen_activities | []string | No | Deprecated: use is_seen on each activity/group instead. IDs of activities tha... |
OwnBatchResponse
type OwnBatchResponse struct {
Data map[string]interface{} `json:"data,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| data | map[string]interface{} | Yes | Map of feed ID to own fields data |
| duration | string | Yes |
PagerRequest
type PagerRequest struct {
Limit int `json:"limit,omitempty"`
Next string `json:"next,omitempty"`
Prev string `json:"prev,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| limit | int | No | |
| next | string | No | |
| prev | string | No |
PagerResponse
type PagerResponse struct {
Next string `json:"next,omitempty"`
Prev string `json:"prev,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| next | string | No | |
| prev | string | No |
PinActivityResponse
type PinActivityResponse struct {
Activity ActivityResponse `json:"activity,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Duration string `json:"duration,omitempty"`
Feed string `json:"feed,omitempty"`
UserId string `json:"user_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The pinned activity |
| created_at | float64 | Yes | When the activity was pinned |
| duration | string | Yes | |
| feed | string | Yes | Fully qualified ID of the feed the activity was pinned to |
| user_id | string | Yes | ID of the user who pinned the activity |
PollResponseData
type PollResponseData struct {
AllowAnswers bool `json:"allow_answers,omitempty"`
AllowUserSuggestedOptions bool `json:"allow_user_suggested_options,omitempty"`
AnswersCount int `json:"answers_count,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
CreatedBy UserResponse `json:"created_by,omitempty"`
CreatedById string `json:"created_by_id,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
Description string `json:"description,omitempty"`
EnforceUniqueVote bool `json:"enforce_unique_vote,omitempty"`
Id string `json:"id,omitempty"`
IsClosed bool `json:"is_closed,omitempty"`
LatestAnswers []PollVoteResponseData `json:"latest_answers,omitempty"`
LatestVotesByOption map[string]interface{} `json:"latest_votes_by_option,omitempty"`
MaxVotesAllowed int `json:"max_votes_allowed,omitempty"`
Name string `json:"name,omitempty"`
Options []PollOptionResponseData `json:"options,omitempty"`
OwnVotes []PollVoteResponseData `json:"own_votes,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
VoteCount int `json:"vote_count,omitempty"`
VoteCountsByOption map[string]interface{} `json:"vote_counts_by_option,omitempty"`
VotingVisibility string `json:"voting_visibility,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| allow_answers | bool | Yes | |
| allow_user_suggested_options | bool | Yes | |
| answers_count | int | Yes | |
| created_at | float64 | Yes | |
| created_by_id | string | Yes | |
| custom | map[string]interface{} | Yes | |
| description | string | Yes | |
| enforce_unique_vote | bool | Yes | |
| id | string | Yes | |
| latest_answers | []PollVoteResponseData | Yes | |
| latest_votes_by_option | map[string]interface{} | Yes | |
| name | string | Yes | |
| options | []PollOptionResponseData | Yes | |
| own_votes | []PollVoteResponseData | Yes | |
| updated_at | float64 | Yes | |
| vote_count | int | Yes | |
| vote_counts_by_option | map[string]interface{} | Yes | |
| voting_visibility | string | Yes | |
| created_by | UserResponse | No | |
| is_closed | bool | No | |
| max_votes_allowed | int | No |
PollVoteResponse
type PollVoteResponse struct {
Duration string `json:"duration,omitempty"`
Poll PollResponseData `json:"poll,omitempty"`
Vote PollVoteResponseData `json:"vote,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| poll | PollResponseData | No | Poll |
| vote | PollVoteResponseData | No | Poll vote |
PollVoteResponseData
type PollVoteResponseData struct {
AnswerText string `json:"answer_text,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Id string `json:"id,omitempty"`
IsAnswer bool `json:"is_answer,omitempty"`
OptionId string `json:"option_id,omitempty"`
PollId string `json:"poll_id,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
User UserResponse `json:"user,omitempty"`
UserId string `json:"user_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float64 | Yes | |
| id | string | Yes | |
| option_id | string | Yes | |
| poll_id | string | Yes | |
| updated_at | float64 | Yes | |
| answer_text | string | No | |
| is_answer | bool | No | |
| user | UserResponse | No | |
| user_id | string | No |
PrivacySettingsResponse
type PrivacySettingsResponse struct {
DeliveryReceipts DeliveryReceiptsResponse `json:"delivery_receipts,omitempty"`
ReadReceipts ReadReceiptsResponse `json:"read_receipts,omitempty"`
TypingIndicators TypingIndicatorsResponse `json:"typing_indicators,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| delivery_receipts | DeliveryReceiptsResponse | No | |
| read_receipts | ReadReceiptsResponse | No | |
| typing_indicators | TypingIndicatorsResponse | No |
PushNotificationConfig
type PushNotificationConfig struct {
EnablePush bool `json:"enable_push,omitempty"`
PushTypes []string `json:"push_types,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| enable_push | bool | No | Whether push notifications are enabled for this feed group |
| push_types | []string | No | List of notification types that should trigger push notifications (e.g., foll... |
QueryActivitiesResponse
type QueryActivitiesResponse struct {
Activities []ActivityResponse `json:"activities,omitempty"`
Duration string `json:"duration,omitempty"`
Next string `json:"next,omitempty"`
Prev string `json:"prev,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activities | []ActivityResponse | Yes | List of activities matching the query |
| duration | string | Yes | |
| next | string | No | Cursor for next page |
| prev | string | No | Cursor for previous page |
QueryActivityReactionsResponse
Basic response information
type QueryActivityReactionsResponse struct {
Duration string `json:"duration,omitempty"`
Next string `json:"next,omitempty"`
Prev string `json:"prev,omitempty"`
Reactions []FeedsReactionResponse `json:"reactions,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| reactions | []FeedsReactionResponse | Yes | |
| next | string | No | |
| prev | string | No |
QueryBookmarkFoldersResponse
type QueryBookmarkFoldersResponse struct {
BookmarkFolders []BookmarkFolderResponse `json:"bookmark_folders,omitempty"`
Duration string `json:"duration,omitempty"`
Next string `json:"next,omitempty"`
Prev string `json:"prev,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark_folders | []BookmarkFolderResponse | Yes | List of bookmark folders matching the query |
| duration | string | Yes | |
| next | string | No | Cursor for next page |
| prev | string | No | Cursor for previous page |
QueryBookmarksResponse
type QueryBookmarksResponse struct {
Bookmarks []BookmarkResponse `json:"bookmarks,omitempty"`
Duration string `json:"duration,omitempty"`
Next string `json:"next,omitempty"`
Prev string `json:"prev,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmarks | []BookmarkResponse | Yes | List of bookmarks matching the query |
| duration | string | Yes | |
| next | string | No | Cursor for next page |
| prev | string | No | Cursor for previous page |
QueryCollectionsResponse
type QueryCollectionsResponse struct {
Collections []CollectionResponse `json:"collections,omitempty"`
Duration string `json:"duration,omitempty"`
Next string `json:"next,omitempty"`
Prev string `json:"prev,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| collections | []CollectionResponse | Yes | List of collections matching the query |
| duration | string | Yes | |
| next | string | No | Cursor for next page |
| prev | string | No | Cursor for previous page |
QueryCommentReactionsResponse
Basic response information
type QueryCommentReactionsResponse struct {
Duration string `json:"duration,omitempty"`
Next string `json:"next,omitempty"`
Prev string `json:"prev,omitempty"`
Reactions []FeedsReactionResponse `json:"reactions,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| reactions | []FeedsReactionResponse | Yes | |
| next | string | No | |
| prev | string | No |
QueryCommentsResponse
type QueryCommentsResponse struct {
Comments []CommentResponse `json:"comments,omitempty"`
Duration string `json:"duration,omitempty"`
Next string `json:"next,omitempty"`
Prev string `json:"prev,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comments | []CommentResponse | Yes | List of comments matching the query |
| duration | string | Yes | |
| next | string | No | Cursor for next page |
| prev | string | No | Cursor for previous page |
QueryFeedMembersResponse
type QueryFeedMembersResponse struct {
Duration string `json:"duration,omitempty"`
Members []FeedMemberResponse `json:"members,omitempty"`
Next string `json:"next,omitempty"`
Prev string `json:"prev,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| members | []FeedMemberResponse | Yes | List of feed members |
| next | string | No | Cursor for next page |
| prev | string | No | Cursor for previous page |
QueryFeedsResponse
type QueryFeedsResponse struct {
Duration string `json:"duration,omitempty"`
Feeds []FeedResponse `json:"feeds,omitempty"`
Next string `json:"next,omitempty"`
Prev string `json:"prev,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| feeds | []FeedResponse | Yes | List of feeds matching the query |
| next | string | No | Cursor for next page |
| prev | string | No | Cursor for previous page |
QueryFeedsUsageStatsResponse
type QueryFeedsUsageStatsResponse struct {
Activities DailyMetricStatsResponse `json:"activities,omitempty"`
ApiRequests DailyMetricStatsResponse `json:"api_requests,omitempty"`
Duration string `json:"duration,omitempty"`
Emau EMAUStatsResponse `json:"emau,omitempty"`
Follows DailyMetricStatsResponse `json:"follows,omitempty"`
OpenaiRequests DailyMetricStatsResponse `json:"openai_requests,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activities | DailyMetricStatsResponse | Yes | Activities statistics with daily breakdown and total |
| api_requests | DailyMetricStatsResponse | Yes | API requests statistics with daily breakdown and total |
| duration | string | Yes | |
| follows | DailyMetricStatsResponse | Yes | Follows statistics with daily breakdown and total |
| openai_requests | DailyMetricStatsResponse | Yes | OpenAI requests statistics with daily breakdown and total |
| emau | EMAUStatsResponse | No | Engaged Monthly Active Users snapshots within the requested date range. Omitt... |
QueryFollowsResponse
type QueryFollowsResponse struct {
Duration string `json:"duration,omitempty"`
Follows []FollowResponse `json:"follows,omitempty"`
Next string `json:"next,omitempty"`
Prev string `json:"prev,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| follows | []FollowResponse | Yes | List of follow relationships matching the query |
| next | string | No | Cursor for next page |
| prev | string | No | Cursor for previous page |
QueryMembershipLevelsResponse
type QueryMembershipLevelsResponse struct {
Duration string `json:"duration,omitempty"`
MembershipLevels []MembershipLevelResponse `json:"membership_levels,omitempty"`
Next string `json:"next,omitempty"`
Prev string `json:"prev,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| membership_levels | []MembershipLevelResponse | Yes | |
| next | string | No | Cursor for next page |
| prev | string | No | Cursor for previous page |
QueryPinnedActivitiesResponse
type QueryPinnedActivitiesResponse struct {
Duration string `json:"duration,omitempty"`
Next string `json:"next,omitempty"`
PinnedActivities []ActivityPinResponse `json:"pinned_activities,omitempty"`
Prev string `json:"prev,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| pinned_activities | []ActivityPinResponse | Yes | List of pinned activities matching the query |
| next | string | No | Cursor for next page |
| prev | string | No | Cursor for previous page |
RankingConfig
type RankingConfig struct {
Defaults map[string]interface{} `json:"defaults,omitempty"`
Functions map[string]interface{} `json:"functions,omitempty"`
Score string `json:"score,omitempty"`
Type string `json:"type,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | Type of ranking algorithm. Required. One of: expression, interest |
| defaults | map[string]interface{} | No | Default values for ranking |
| functions | map[string]interface{} | No | Decay functions configuration |
| score | string | No | Scoring formula. Required when type is 'expression' or 'interest' |
Reaction
type Reaction struct {
ActivityId string `json:"activity_id,omitempty"`
ChildrenCounts map[string]interface{} `json:"children_counts,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Data map[string]interface{} `json:"data,omitempty"`
DeletedAt float64 `json:"deleted_at,omitempty"`
Id string `json:"id,omitempty"`
Kind string `json:"kind,omitempty"`
LatestChildren map[string]interface{} `json:"latest_children,omitempty"`
Moderation map[string]interface{} `json:"moderation,omitempty"`
OwnChildren map[string]interface{} `json:"own_children,omitempty"`
Parent string `json:"parent,omitempty"`
Score float64 `json:"score,omitempty"`
TargetFeeds []string `json:"target_feeds,omitempty"`
TargetFeedsExtraData map[string]interface{} `json:"target_feeds_extra_data,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
User User `json:"user,omitempty"`
UserId string `json:"user_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_id | string | Yes | |
| created_at | float64 | Yes | |
| kind | string | Yes | |
| updated_at | float64 | Yes | |
| user_id | string | Yes | |
| children_counts | map[string]interface{} | No | |
| data | map[string]interface{} | No | |
| deleted_at | float64 | No | |
| id | string | No | |
| latest_children | map[string]interface{} | No | |
| moderation | map[string]interface{} | No | |
| own_children | map[string]interface{} | No | |
| parent | string | No | |
| score | float64 | No | |
| target_feeds | []string | No | |
| target_feeds_extra_data | map[string]interface{} | No | |
| user | User | No |
ReadCollectionsResponse
type ReadCollectionsResponse struct {
Collections []CollectionResponse `json:"collections,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| collections | []CollectionResponse | Yes | List of collections matching the references |
| duration | string | Yes |
RejectFeedMemberInviteResponse
type RejectFeedMemberInviteResponse struct {
Duration string `json:"duration,omitempty"`
Member FeedMemberResponse `json:"member,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| member | FeedMemberResponse | Yes | The feed member after rejecting the invite |
RejectFollowResponse
type RejectFollowResponse struct {
Duration string `json:"duration,omitempty"`
Follow FollowResponse `json:"follow,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| follow | FollowResponse | Yes | The rejected follow relationship |
Response
Basic response information
type Response struct {
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
RestoreActivityResponse
type RestoreActivityResponse struct {
Activity ActivityResponse `json:"activity,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The restored activity with full enrichment |
| duration | string | Yes |
RestoreCommentResponse
type RestoreCommentResponse struct {
Activity ActivityResponse `json:"activity,omitempty"`
Comment CommentResponse `json:"comment,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The parent activity with updated counts |
| comment | CommentResponse | Yes | The restored comment |
| duration | string | Yes |
RestoreFeedGroupResponse
type RestoreFeedGroupResponse struct {
Duration string `json:"duration,omitempty"`
FeedGroup FeedGroupResponse `json:"feed_group,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| feed_group | FeedGroupResponse | Yes | The restored feed group |
Role
type Role struct {
CreatedAt float64 `json:"created_at,omitempty"`
Custom bool `json:"custom,omitempty"`
Name string `json:"name,omitempty"`
Scopes []string `json:"scopes,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float64 | Yes | Date/time of creation |
| custom | bool | Yes | Whether this is a custom role or built-in |
| name | string | Yes | Unique role name |
| scopes | []string | Yes | List of scopes where this role is currently present. .app means that role i... |
| updated_at | float64 | Yes | Date/time of the last update |
SingleFollowResponse
type SingleFollowResponse struct {
Duration string `json:"duration,omitempty"`
Follow FollowResponse `json:"follow,omitempty"`
NotificationCreated bool `json:"notification_created,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| follow | FollowResponse | Yes | The created follow relationship |
| notification_created | bool | No | Whether a notification activity was successfully created |
SortParamRequest
type SortParamRequest struct {
Direction int `json:"direction,omitempty"`
Field string `json:"field,omitempty"`
Type string `json:"type,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| direction | int | No | Direction of sorting, 1 for Ascending, -1 for Descending, default is 1. One o... |
| field | string | No | Name of field to sort by |
| type | string | No | Type of field to sort by. Empty string or omitted means string type (default)... |
StoriesConfig
type StoriesConfig struct {
SkipWatched bool `json:"skip_watched,omitempty"`
TrackWatched bool `json:"track_watched,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| skip_watched | bool | No | Whether to skip already watched stories |
| track_watched | bool | No | Whether to track watched status for stories |
ThreadedCommentResponse
A comment with an optional, depth‑limited slice of nested replies.
type ThreadedCommentResponse struct {
Attachments []Attachment `json:"attachments,omitempty"`
BookmarkCount int `json:"bookmark_count,omitempty"`
ConfidenceScore float64 `json:"confidence_score,omitempty"`
ControversyScore float64 `json:"controversy_score,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
DeletedAt float64 `json:"deleted_at,omitempty"`
DownvoteCount int `json:"downvote_count,omitempty"`
EditedAt float64 `json:"edited_at,omitempty"`
Id string `json:"id,omitempty"`
LatestReactions []FeedsReactionResponse `json:"latest_reactions,omitempty"`
MentionedUsers []UserResponse `json:"mentioned_users,omitempty"`
Meta RepliesMeta `json:"meta,omitempty"`
Moderation ModerationV2Response `json:"moderation,omitempty"`
ObjectId string `json:"object_id,omitempty"`
ObjectType string `json:"object_type,omitempty"`
OwnReactions []FeedsReactionResponse `json:"own_reactions,omitempty"`
ParentId string `json:"parent_id,omitempty"`
ReactionCount int `json:"reaction_count,omitempty"`
ReactionGroups map[string]interface{} `json:"reaction_groups,omitempty"`
Replies []ThreadedCommentResponse `json:"replies,omitempty"`
ReplyCount int `json:"reply_count,omitempty"`
Score int `json:"score,omitempty"`
Status string `json:"status,omitempty"`
Text string `json:"text,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
UpvoteCount int `json:"upvote_count,omitempty"`
User UserResponse `json:"user,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark_count | int | Yes | |
| confidence_score | float64 | Yes | |
| created_at | float64 | Yes | |
| downvote_count | int | Yes | |
| id | string | Yes | |
| mentioned_users | []UserResponse | Yes | |
| object_id | string | Yes | |
| object_type | string | Yes | |
| own_reactions | []FeedsReactionResponse | Yes | |
| reaction_count | int | Yes | |
| reply_count | int | Yes | |
| score | int | Yes | |
| status | string | Yes | Status of the comment. One of: active, deleted, removed, hidden |
| updated_at | float64 | Yes | |
| upvote_count | int | Yes | |
| user | UserResponse | Yes | |
| attachments | []Attachment | No | |
| controversy_score | float64 | No | |
| custom | map[string]interface{} | No | |
| deleted_at | float64 | No | |
| edited_at | float64 | No | |
| latest_reactions | []FeedsReactionResponse | No | |
| meta | RepliesMeta | No | Pagination & depth info for this node's direct replies. |
| moderation | ModerationV2Response | No | |
| parent_id | string | No | |
| reaction_groups | map[string]interface{} | No | |
| replies | []ThreadedCommentResponse | No | Slice of nested comments (may be empty). |
| text | string | No |
Time
type Time struct {
}TrackActivityMetricsEvent
A single metric event to track for an activity
type TrackActivityMetricsEvent struct {
ActivityId string `json:"activity_id,omitempty"`
Delta int `json:"delta,omitempty"`
Metric string `json:"metric,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_id | string | Yes | The ID of the activity to track the metric for |
| metric | string | Yes | The metric name (e.g. views, clicks, impressions). Alphanumeric and underscor... |
| delta | int | No | The amount to increment (positive) or decrement (negative). Defaults to 1. Th... |
TrackActivityMetricsEventResult
Result of tracking a single metric event
type TrackActivityMetricsEventResult struct {
ActivityId string `json:"activity_id,omitempty"`
Allowed bool `json:"allowed,omitempty"`
Error string `json:"error,omitempty"`
Metric string `json:"metric,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_id | string | Yes | The activity ID from the request |
| allowed | bool | Yes | Whether the metric was counted (false if rate-limited) |
| metric | string | Yes | The metric name from the request |
| error | string | No | Error message if processing failed |
TrackActivityMetricsResponse
Response containing results for each tracked metric event
type TrackActivityMetricsResponse struct {
Duration string `json:"duration,omitempty"`
Results []TrackActivityMetricsEventResult `json:"results,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| results | []TrackActivityMetricsEventResult | Yes | Results for each event in the request, in the same order |
UnfollowBatchResponse
type UnfollowBatchResponse struct {
Duration string `json:"duration,omitempty"`
Follows []FollowResponse `json:"follows,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| follows | []FollowResponse | Yes | List of follow relationships that were removed |
UnfollowPair
type UnfollowPair struct {
KeepHistory bool `json:"keep_history,omitempty"`
Source string `json:"source,omitempty"`
Target string `json:"target,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| source | string | Yes | Fully qualified ID of the source feed |
| target | string | Yes | Fully qualified ID of the target feed |
| keep_history | bool | No | When true, activities from the unfollowed feed will remain in the source feed... |
UnfollowResponse
type UnfollowResponse struct {
Duration string `json:"duration,omitempty"`
Follow FollowResponse `json:"follow,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| follow | FollowResponse | Yes | The deleted follow relationship |
UnpinActivityResponse
type UnpinActivityResponse struct {
Activity ActivityResponse `json:"activity,omitempty"`
Duration string `json:"duration,omitempty"`
Feed string `json:"feed,omitempty"`
UserId string `json:"user_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The unpinned activity |
| duration | string | Yes | |
| feed | string | Yes | Fully qualified ID of the feed the activity was unpinned from |
| user_id | string | Yes | ID of the user who unpinned the activity |
UpdateActivitiesPartialBatchResponse
type UpdateActivitiesPartialBatchResponse struct {
Activities []ActivityResponse `json:"activities,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activities | []ActivityResponse | Yes | List of successfully updated activities |
| duration | string | Yes |
UpdateActivityPartialChangeRequest
type UpdateActivityPartialChangeRequest struct {
ActivityId string `json:"activity_id,omitempty"`
CopyCustomToNotification bool `json:"copy_custom_to_notification,omitempty"`
HandleMentionNotifications bool `json:"handle_mention_notifications,omitempty"`
Set map[string]interface{} `json:"set,omitempty"`
Unset []string `json:"unset,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_id | string | Yes | ID of the activity to update |
| copy_custom_to_notification | bool | No | Whether to copy custom data to the notification activity (only applies when h... |
| handle_mention_notifications | bool | No | When true and 'mentioned_user_ids' is updated, automatically creates or delet... |
| set | map[string]interface{} | No | Map of field names to new values. Supported fields: 'text', 'attachments', 'c... |
| unset | []string | No | List of field names to remove. Supported fields: 'custom', 'location', 'expir... |
UpdateActivityPartialResponse
type UpdateActivityPartialResponse struct {
Activity ActivityResponse `json:"activity,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The updated activity |
| duration | string | Yes |
UpdateActivityResponse
type UpdateActivityResponse struct {
Activity ActivityResponse `json:"activity,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The updated activity |
| duration | string | Yes |
UpdateBookmarkFolderResponse
type UpdateBookmarkFolderResponse struct {
BookmarkFolder BookmarkFolderResponse `json:"bookmark_folder,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark_folder | BookmarkFolderResponse | Yes | The updated bookmark folder |
| duration | string | Yes |
UpdateBookmarkResponse
type UpdateBookmarkResponse struct {
Bookmark BookmarkResponse `json:"bookmark,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark | BookmarkResponse | Yes | The updated bookmark |
| duration | string | Yes |
UpdateCollectionRequest
type UpdateCollectionRequest struct {
Custom map[string]interface{} `json:"custom,omitempty"`
Id string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | map[string]interface{} | Yes | Custom data for the collection (required, must contain at least one key) |
| id | string | Yes | Unique identifier for the collection within its name |
| name | string | Yes | Name/type of the collection |
UpdateCollectionsResponse
type UpdateCollectionsResponse struct {
Collections []CollectionResponse `json:"collections,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| collections | []CollectionResponse | Yes | List of updated collections |
| duration | string | Yes |
UpdateCommentBookmarkResponse
type UpdateCommentBookmarkResponse struct {
Bookmark BookmarkResponse `json:"bookmark,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark | BookmarkResponse | Yes | The updated comment bookmark |
| duration | string | Yes |
UpdateCommentPartialResponse
type UpdateCommentPartialResponse struct {
Comment CommentResponse `json:"comment,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comment | CommentResponse | Yes | The updated comment |
| duration | string | Yes |
UpdateCommentResponse
type UpdateCommentResponse struct {
Comment CommentResponse `json:"comment,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comment | CommentResponse | Yes | The updated comment |
| duration | string | Yes |
UpdateFeedGroupResponse
type UpdateFeedGroupResponse struct {
Duration string `json:"duration,omitempty"`
FeedGroup FeedGroupResponse `json:"feed_group,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| feed_group | FeedGroupResponse | Yes | The updated feed group |
UpdateFeedMembersResponse
Basic response information
type UpdateFeedMembersResponse struct {
Added []FeedMemberResponse `json:"added,omitempty"`
Duration string `json:"duration,omitempty"`
RemovedIds []string `json:"removed_ids,omitempty"`
Updated []FeedMemberResponse `json:"updated,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| added | []FeedMemberResponse | Yes | |
| duration | string | Yes | Duration of the request in milliseconds |
| removed_ids | []string | Yes | |
| updated | []FeedMemberResponse | Yes |
UpdateFeedResponse
type UpdateFeedResponse struct {
Duration string `json:"duration,omitempty"`
Feed FeedResponse `json:"feed,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| feed | FeedResponse | Yes | The updated feed |
UpdateFeedViewResponse
type UpdateFeedViewResponse struct {
Duration string `json:"duration,omitempty"`
FeedView FeedViewResponse `json:"feed_view,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| feed_view | FeedViewResponse | Yes | The updated feed view |
UpdateFeedVisibilityResponse
type UpdateFeedVisibilityResponse struct {
Duration string `json:"duration,omitempty"`
FeedVisibility FeedVisibilityResponse `json:"feed_visibility,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| feed_visibility | FeedVisibilityResponse | Yes | Feed visibility configuration and permissions |
UpdateFollowResponse
type UpdateFollowResponse struct {
Duration string `json:"duration,omitempty"`
Follow FollowResponse `json:"follow,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| follow | FollowResponse | Yes | Details of the updated follow relationship |
UpdateMembershipLevelResponse
type UpdateMembershipLevelResponse struct {
Duration string `json:"duration,omitempty"`
MembershipLevel MembershipLevelResponse `json:"membership_level,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| membership_level | MembershipLevelResponse | Yes | The updated membership level |
UpsertActivitiesResponse
type UpsertActivitiesResponse struct {
Activities []ActivityResponse `json:"activities,omitempty"`
Duration string `json:"duration,omitempty"`
MentionNotificationsCreated int `json:"mention_notifications_created,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activities | []ActivityResponse | Yes | List of created or updated activities |
| duration | string | Yes | |
| mention_notifications_created | int | No | Total number of mention notification activities created for mentioned users a... |
UpsertCollectionsResponse
type UpsertCollectionsResponse struct {
Collections []CollectionResponse `json:"collections,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| collections | []CollectionResponse | Yes | List of upserted collections |
| duration | string | Yes |
User
type User struct {
Data map[string]interface{} `json:"data,omitempty"`
Id string `json:"id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | |
| data | map[string]interface{} | No |
UserRequest
User request object
type UserRequest struct {
Custom map[string]interface{} `json:"custom,omitempty"`
Id string `json:"id,omitempty"`
Image string `json:"image,omitempty"`
Invisible bool `json:"invisible,omitempty"`
Language string `json:"language,omitempty"`
Name string `json:"name,omitempty"`
PrivacySettings PrivacySettingsResponse `json:"privacy_settings,omitempty"`
Role string `json:"role,omitempty"`
Teams []string `json:"teams,omitempty"`
TeamsRole map[string]interface{} `json:"teams_role,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | User ID |
| custom | map[string]interface{} | No | Custom user data |
| image | string | No | User's profile image URL |
| invisible | bool | No | |
| language | string | No | |
| name | string | No | Optional name of user |
| privacy_settings | PrivacySettingsResponse | No | |
| role | string | No | User's global role |
| teams | []string | No | List of teams the user belongs to |
| teams_role | map[string]interface{} | No | Map of team-specific roles for the user |
UserResponse
User response object
type UserResponse struct {
AvgResponseTime int `json:"avg_response_time,omitempty"`
BanExpires float64 `json:"ban_expires,omitempty"`
Banned bool `json:"banned,omitempty"`
BlockedUserIds []string `json:"blocked_user_ids,omitempty"`
BypassModeration bool `json:"bypass_moderation,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
DeactivatedAt float64 `json:"deactivated_at,omitempty"`
DeletedAt float64 `json:"deleted_at,omitempty"`
Devices []DeviceResponse `json:"devices,omitempty"`
Id string `json:"id,omitempty"`
Image string `json:"image,omitempty"`
Invisible bool `json:"invisible,omitempty"`
Language string `json:"language,omitempty"`
LastActive float64 `json:"last_active,omitempty"`
Name string `json:"name,omitempty"`
Online bool `json:"online,omitempty"`
PrivacySettings PrivacySettingsResponse `json:"privacy_settings,omitempty"`
PushNotifications PushNotificationSettingsResponse `json:"push_notifications,omitempty"`
RevokeTokensIssuedBefore float64 `json:"revoke_tokens_issued_before,omitempty"`
Role string `json:"role,omitempty"`
ShadowBanned bool `json:"shadow_banned,omitempty"`
Teams []string `json:"teams,omitempty"`
TeamsRole map[string]interface{} `json:"teams_role,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | bool | Yes | Whether a user is banned or not |
| blocked_user_ids | []string | Yes | |
| created_at | float64 | Yes | Date/time of creation |
| custom | map[string]interface{} | Yes | Custom data for this object |
| id | string | Yes | Unique user identifier |
| invisible | bool | Yes | |
| language | string | Yes | Preferred language of a user |
| online | bool | Yes | Whether a user online or not |
| role | string | Yes | Determines the set of user permissions |
| shadow_banned | bool | Yes | Whether a user is shadow banned |
| teams | []string | Yes | List of teams user is a part of |
| updated_at | float64 | Yes | Date/time of the last update |
| avg_response_time | int | No | |
| ban_expires | float64 | No | Date when ban expires |
| bypass_moderation | bool | No | |
| deactivated_at | float64 | No | Date of deactivation |
| deleted_at | float64 | No | Date/time of deletion |
| devices | []DeviceResponse | No | List of devices user is using |
| image | string | No | |
| last_active | float64 | No | Date of last activity |
| name | string | No | Optional name of user |
| privacy_settings | PrivacySettingsResponse | No | User privacy settings |
| push_notifications | PushNotificationSettingsResponse | No | User push notification settings |
| revoke_tokens_issued_before | float64 | No | Revocation date for tokens |
| teams_role | map[string]interface{} | No |
VoteData
type VoteData struct {
AnswerText string `json:"answer_text,omitempty"`
OptionId string `json:"option_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| answer_text | string | No | |
| option_id | string | No |