发布评论API
回答有没有办法在一个呼叫中拉出帮助中心的所有帖子评论,而不是通过帖子ID?如果没有,有没有计划增加这个功能?
-
嗨,David,你目前不能在一次调用中获得所有的帖子评论,但你可以构建一个相对较短的脚本,使用列表帖子和列表评论端点来获得相同的结果。逻辑是这样的:
All_posts = get('/api/v2/community/posts')
对于all_posts中的帖子:
Post_comments = get('/api/v2/community/posts/{post['id']}/comments')
all_comments.append (post_comments)
请登录留下评论。
1评论