trustcafe-api-wrapper/jobs/comment/listtbypostid.py
2026-03-31 12:10:15 +01:00

12 lines
No EOL
465 B
Python

def listtbypostid(API, post_id: str,) -> dict:
"""
Fetches the list of comments for a given post ID from the API.
Args:
post_id (str): ID of the post to fetch comments for.
Returns:
dict: The list of comments for the post.
"""
print(f"Fetching comments for post ID: {post_id}")
comment_list = API.make_request("GET", "content", f"comment/bypostid/{post_id}", authenticate=True)
return comment_list