创建评论。
Request
HTTP request
POST https://www.featapi.com/api/activity/comment/
Parameters
授权
此请求需要具有以下所有范围的授权:
Scopes |
---|
activity_comment |
有关更多信息,请参阅认证和授权页面。
Request body
在请求体中,提供具有以下属性的 Activity.comment 资源:
Property name | Value | Description | Notes |
---|---|---|---|
Required Properties | |||
target_type | enum | 评论目标对象类型 | Comment.TargetType |
object_id | integer | 评论对象id | |
content | string | 评论内容 | HTML文本 |
Response
如果成功,则此方法在响应正文中返回 Activity.comment 资源。
201 成功创建评论
{
"data": {
"object_id": 2904865,
"parent_id": null,
"content": "<p>haha</p>",
"id": 502,
"create_time": "2020-03-17T07:07:57.514442Z",
"last_modified": "2020-03-17T07:07:57.514424Z",
"deleted_at": null,
"blocked_at": null,
"user": {
"uid": 4416382589854,
"avatar": "https://pic1.feat.com/media/storage/avatars/MMcSjXJmfdTptMBgmCBvvDOaXHcgGfdcXLzMP405.jpeg",
"expertise": "理发",
"firstname": "zetong",
"lastname": "lin",
"username": "zetong lin",
"timezone": "Asia/Shanghai",
"timezone_utc_offset": "+08:00",
"online": false,
"location": "CHN",
"avatars": {
"path": "https://pic1.feat.com/media/storage/avatars/MMcSjXJmfdTptMBgmCBvvDOaXHcgGfdcXLzMP405.jpeg",
"sizes": {
"sm": {
"width": 32,
"height": 32,
"path": "https://pic1.feat.com/media/sm/storage/avatars/MMcSjXJmfdTptMBgmCBvvDOaXHcgGfdcXLzMP405_32x32.JPEG"
},
"md": {
"width": 64,
"height": 64,
"path": "https://pic1.feat.com/media/md/storage/avatars/MMcSjXJmfdTptMBgmCBvvDOaXHcgGfdcXLzMP405_64x64.JPEG"
},
"lg": {
"width": 300,
"height": 300,
"path": "https://pic1.feat.com/media/lg/storage/avatars/MMcSjXJmfdTptMBgmCBvvDOaXHcgGfdcXLzMP405_300x300.JPEG"
}
}
}
},
"content_type": "reword"
},
"meta": {
"paragraph_id": 3889222,
"paragraph_type": 200
}
}
404 Not found
示例返回数据可参考 API Common – Resource Not Found
400 Submitted data error
示例返回数据可参考 API Common – Validation Exception
401 Permission Deny
示例返回数据可参考 API Common – Authorization Failed