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

Comments

Overview

Comments support voting, ranking, threading, images, URL previews, mentions and notifications.

Adding Comments

response = self.client.feeds.add_comment(
    comment="This is a test comment from Python SDK",
    object_id=activity_id,
    object_type="activity",
    user_id=self.test_user_id,
)

Updating Comments

response = self.client.feeds.add_comment(
    comment="This is a test comment from Python SDK",
    object_id=activity_id,
    object_type="activity",
    user_id=self.test_user_id,
)

Removing Comments

response = self.client.feeds.update_comment(
    comment_id, comment="Updated comment text from Python SDK"
)

Reading Comments

You’ll also want to show/return these comments. The most important is when reading the feed.

response = self.client.feeds.delete_comment(
    comment_id, hard_delete=False
)  # soft delete

Querying Comments

You can also query the comments so you can show all comments for a given activity or user:

response = self.client.feeds.query_comments(
    filter={"object_id": activity_id}, limit=10
)

Comment Reactions

response = self.client.feeds.query_comments(
    filter={"object_id": activity_id}, limit=10
)

Comment Threading

response = self.client.feeds.delete_comment(
    comment_id, hard_delete=False
)  # soft delete
© Getstream.io, Inc. All Rights Reserved.