List comments by post

This commit is contained in:
simonwt 2026-03-31 12:10:15 +01:00
parent 620553ea14
commit d889fdff20
3 changed files with 33 additions and 17 deletions

View file

@ -38,7 +38,7 @@ if not API.is_token_valid():
# branch = API.run_job('branch.get', "music")
# print(branch)
# print("-------------- Get a post -------------------")
# post = API.run_job('post.get', "1774875037-170a46a9")
# post = API.run_job('post.get', "1774951384-98fe38df")
# print(post)
# print("-----------------------------")
# feed = API.run_job('post.listbybranch', "music")
@ -59,18 +59,21 @@ if not API.is_token_valid():
# })
# print(post)
# print("-----------------------------")
post = API.run_job('comment.create', {
"blurLabel": None,
"commentText": "This is a test comment created via the API wrapper.",
"parent": {
"pk": "maintrunk#maintrunk",
"sk": "post#1774951384-98fe38df",
"slug": "1774951384-98fe38df"
},
"topLevel": {
"pk": "maintrunk#maintrunk",
"sk": "post#1774951384-98fe38df"
},
"version": 3
})
print(post)
# post = API.run_job('comment.create', {
# "blurLabel": None,
# "commentText": "This is a test comment created via the API wrapper.",
# "parent": {
# "pk": "maintrunk#maintrunk",
# "sk": "post#1774951384-98fe38df",
# "slug": "1774951384-98fe38df"
# },
# "topLevel": {
# "pk": "maintrunk#maintrunk",
# "sk": "post#1774951384-98fe38df"
# },
# "version": 3
# })
# print(post)
# print("-----------------------------")
feed = API.run_job('comment.listtbypostid', "1774951384-98fe38df")
print(feed)