List comments by post
This commit is contained in:
parent
620553ea14
commit
d889fdff20
3 changed files with 33 additions and 17 deletions
|
|
@ -1 +1,2 @@
|
|||
from .create import create
|
||||
from .create import create
|
||||
from .listtbypostid import listtbypostid
|
||||
12
jobs/comment/listtbypostid.py
Normal file
12
jobs/comment/listtbypostid.py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue