Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update comment_scraper.py #94

Merged
merged 1 commit into from
Feb 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/comments/comment_scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def build_comments_list(client, asset_id, comment_list):
build_comments_list(client, asset['id'], comment_list)

if asset.get('type') == 'file' and asset.get('comment_count') > 0:
comments = client.comments.get(asset['id'])
comments = client.comments.list(asset['id'])
for comment in comments:
# The 'get_comments" call won't return the asset name
# So we'll add it to the dictionary now.
Expand All @@ -44,7 +44,7 @@ def build_comments_list(client, asset_id, comment_list):
# Read about version stacks: https://docs.frame.io/docs/managing-version-stacks
versions = client.assets.get_children(asset['id'])
for v_asset in versions:
comments = client.comments.get(v_asset['id'])
comments = client.comments.list(v_asset['id'])
for comment in comments:
comment['asset'] = { 'name': asset['name'] }
comment_list.append(comment)
Expand Down