返回指定对象的评论列表。
Request
HTTP request
GET https://www.featapi.com/api/activity/comment/comment-list/
Parameters
- Query parameters
Parameter name | Value | Description |
---|---|---|
Required parameters | ||
target_type | enum | Comment.TargetType, 评论的对象类型 |
object_id | string | 评论的对象id |
Optional parameters | ||
page | string | page number |
page_size | string | page size |
授权
此请求需要具有以下所有范围的授权:
Scopes |
---|
activity_comment |
有关更多信息,请参阅认证和授权页面。
Request body
无
Response
如果成功,则此方法在响应正文中返回 Activity.comment 资源。
200 成功返回列表
{
"data": [
{
"object_id": 7,
"parent_id": null,
"content": "<p>哈哈</p>",
"id": 21,
"create_time": "2020-03-16T00:38:11.622981Z",
"last_modified": "2020-03-16T00:38:11.622940Z",
"deleted_at": null,
"blocked_at": null,
"user": {
"uid": 6715983880802,
"avatar": "http://127.0.0.1:8000/media/6715983880802/avatar/6715983880802.jpg",
"expertise": "测试",
"firstname": "淑珍",
"lastname": "杨",
"username": "淑珍 杨",
"timezone": "Asia/Shanghai",
"timezone_utc_offset": "+08:00",
"online": false,
"location": "CHN",
"avatars": {
"path": "http://127.0.0.1:8000/media/6715983880802/avatar/6715983880802.jpg",
"sizes": {
"sm": {
"width": 32,
"height": 32,
"path": "http://127.0.0.1:8000/media/sm/6715983880802/avatar/6715983880802_32x32.JPEG"
},
"md": {
"width": 64,
"height": 64,
"path": "http://127.0.0.1:8000/media/md/6715983880802/avatar/6715983880802_64x64.JPEG"
},
"lg": {
"width": 300,
"height": 300,
"path": "http://127.0.0.1:8000/media/lg/6715983880802/avatar/6715983880802_300x300.JPEG"
}
}
}
},
"children": [],
"content_type": "event",
"meta": null
}],
"pagination": {
"page_size": 50,
"total_count": 1,
"total_pages": 1,
"current_page": 1,
"next": null,
"previous": null
}
}
404 Not found
示例返回数据可参考 API Common – Resource Not Found