评论详情
示例
{
"code": 0,
"data": {
"comment_id": 1,
"commentable_id": 1,
"commentable_type": "question",
"user_id": 1,
"content": "mdui 是我见过的 Web 框架里对规范实现最好的一版了",
"vote_count": 44,
"vote_up_count": 96,
"vote_down_count": 52,
"create_time": 1563512214,
"update_time": 1563512214,
"delete_time": 0,
"relationships": {
"user": {
"user_id": 1,
"username": "zdhxiong",
"headline": "mdui作者",
"avatar": {
"original": "https://mdclub.org/user-avatar/c4/ca/bc03445db47540eea79148252e7a91fe.jpg",
"small": "https://mdclub.org/user-avatar/c4/ca/bc03445db47540eea79148252e7a91fe_small.jpg",
"middle": "https://mdclub.org/user-avatar/c4/ca/bc03445db47540eea79148252e7a91fe_middle.jpg",
"large": "https://mdclub.org/user-avatar/c4/ca/bc03445db47540eea79148252e7a91fe_large.jpg"
}
},
"voting": "up"
}
}
}
参数说明
参数名 |
类型 |
说明 |
code |
integer |
无任何错误时,状态码为 0
|
data.comment_id |
integer |
评论ID
|
data.commentable_id |
integer |
评论目标的ID
|
data.commentable_type |
string |
评论目标类型
取值范围包括:article , question , answer , comment
|
data.user_id |
integer |
用户ID
|
data.content |
string |
评论内容
|
data.vote_count |
integer |
投票数(赞成票 - 反对票,可能为负数)
|
data.vote_up_count |
integer |
赞成票总数
|
data.vote_down_count |
integer |
反对票总数
|
data.create_time |
integer |
发表时间
|
data.update_time |
integer |
修改时间
|
data.delete_time |
integer |
🔐删除时间
|
data.relationships.user.user_id |
integer |
用户ID
|
data.relationships.user.username |
string |
用户名
|
data.relationships.user.headline |
string |
一句话介绍
|
data.relationships.user.avatar.original |
string |
头像原图地址
|
data.relationships.user.avatar.small |
string |
小头像地址
|
data.relationships.user.avatar.middle |
string |
中头像地址
|
data.relationships.user.avatar.large |
string |
大头像地址
|
data.relationships.voting |
string |
当前登录用户的投票类型(up 、down ),未投过票则为空字符串
取值范围包括:up , down ,
|