添加查看二级评论明细

This commit is contained in:
社会易姐QwQ 2020-06-14 12:54:59 +08:00
parent 59d743c9d5
commit 44568e729e

View File

@ -42,7 +42,7 @@
| 字段 | 类型 | 内容 | 备注 |
| ------- | ----------------------------- | -------- | ------------------------------------------------------------ |
| code | num | 返回值 | 0成功<br />-400请求错误<br />-404无此项<br />12002评论区已关闭 |
| code | num | 返回值 | 0成功<br />-400请求错误<br />-404无此项<br />12002评论区已关闭<br />12009评论主体的type不合法 |
| message | str | 错误信息 | 默认为0 |
| ttl | num | 1 | **作用尚不明确** |
| data | 正确时obj<br />错误时null | 数据本体 | |
@ -2345,7 +2345,7 @@
| 字段 | 类型 | 内容 | 备注 |
| ------- | ----------------------------- | -------- | ------------------------------------------------------------ |
| code | num | 返回值 | 0成功<br />-400请求错误<br />-404无此项<br />12002评论区已关闭 |
| code | num | 返回值 | 0成功<br />-400请求错误<br />-404无此项<br />12002评论区已关闭<br />12009评论主体的type不合法 |
| message | str | 错误信息 | 默认为0 |
| ttl | num | 1 | **作用尚不明确** |
| data | 正确时obj<br />错误时null | 数据本体 | |
@ -4689,7 +4689,725 @@ http://api.bilibili.com/x/v2/reply/main?type=1&oid=2&mode=3&next=0&ps=5
## 获取评论区指定条目及二级回复(分离结构 无楼层号)
> http://api.bilibili.com/x/v2/reply/reply
*方式GET*
按照热度排列
**url参数**
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
| ------ | ---- | ---------------- | ------ | -------------------------- |
| type | num | 评论区类型代码 | 必要 | **类型代码见上表** |
| oid | num | 目标评论区ID | 必要 | |
| root | num | 目标评论ID | 必要 | |
| pn | num | 二级评论页码 | 非必要 | 默认为1 |
| ps | num | 二级评论每页项数 | 非必要 | 默认为20<br />定义域1-49 |
**json回复**
根对象:
| 字段 | 类型 | 内容 | 备注 |
| ------- | ----------------------------- | -------- | ------------------------------------------------------------ |
| code | num | 返回值 | 0成功<br />-400请求错误<br />-404无此项<br />12002评论区已关闭<br />12009评论主体的type不合法 |
| message | str | 错误信息 | 默认为0 |
| ttl | num | 1 | **作用尚不明确** |
| data | 正确时obj<br />错误时null | 数据本体 | |
`data`对象:
| 字段 | 类型 | 内容 | 备注 |
| ------------ | -------------------------------- | -------- | ---------------- |
| config | obj | 属性信息 | |
| control | obj | 评论区输入属性 | |
| page | obj | 页信息 | |
| replies | array | 二级评论列表 | |
| root | obj | 根评论 | **详情见附表** |
| show_bvid | bool | true | **作用尚不明确** |
| upper | obj | UP主UID | |
`data`中的`page`对象:
| 字段 | 类型 | 内容 | 备注 |
| ------ | ---- | ------------ | ---- |
| num | num | 当前页码 | |
| size | num | 每页项数 | |
| count | num | 根评论条数 | |
| acount | num | 总计评论条数 | |
`data`中的`config`对象:
| 字段 | 类型 | 内容 | 备注 |
| ------------ | ---- | ----- | ---------------- |
| showadmin | num | 0 | **作用尚不明确** |
| showentry | num | 0 | **作用尚不明确** |
| showfloor | num | 0 | **作用尚不明确** |
| showtopic | num | 0 | **作用尚不明确** |
| show_up_flag | bool | false | **作用尚不明确** |
| read_only | bool | false | **作用尚不明确** |
| show_del_log | bool | false | **作用尚不明确** |
`data`中的`replies`数组:
| 项 | 类型 | 内容 | 备注 |
| ---- | ---- | ----------------- | -------------- |
| 0 | obj | 二级评论条目1 | **详情见附表** |
| n | obj | 二级评论条目(n+1) | 按照热度排列 |
| …… | obj | …… | …… |
`data`中的`upper`对象:
| 字段 | 类型 | 内容 | 备注 |
| ---- | ---- | ------- | ---- |
| mid | num | UP主UID | |
**示例:**
获取视频`av2`下评论`476670`的二级评论每页5项查看第1页
http://api.bilibili.com/x/v2/reply/reply?type=1&oid=2&root=476670&pn=1&ps=5
```json
{
"code": 0,
"message": "0",
"ttl": 1,
"data": {
"config": {
"showadmin": 0,
"showentry": 0,
"showfloor": 0,
"showtopic": 0,
"show_up_flag": false,
"read_only": false,
"show_del_log": false
},
"control": {
"input_disable": false,
"root_input_text": "",
"child_input_text": "",
"bg_text": "看看下面~来发评论吧",
"web_selection": false,
"answer_guide_text": "需要升级成为lv2会员后才可以评论先去答题转正吧",
"answer_guide_icon_url": "http://i0.hdslb.com/bfs/emote/96940d16602cacbbac796245b7bb99fa9b5c970c.png",
"answer_guide_ios_url": "https://www.bilibili.com/h5/newbie/entry?navhide=1&re_src=12",
"answer_guide_android_url": "https://www.bilibili.com/h5/newbie/entry?navhide=1&re_src=6"
},
"page": {
"count": 1843,
"num": 1,
"size": 5
},
"replies": [
{
"rpid": 214198179,
"oid": 2,
"type": 1,
"mid": 18370638,
"root": 476670,
"parent": 476670,
"dialog": 214198179,
"count": 0,
"rcount": 0,
"state": 0,
"fansgrade": 0,
"attr": 0,
"ctime": 1488888303,
"rpid_str": "214198179",
"root_str": "476670",
"parent_str": "476670",
"like": 1087,
"action": 0,
"member": {
"mid": "18370638",
"uname": "初音ハク",
"sex": "保密",
"sign": "我是艾尔的利刃",
"avatar": "http://i0.hdslb.com/bfs/face/50b3a20369f4358beca8078ef6ac652093ce7414.jpg",
"rank": "10000",
"DisplayRank": "0",
"level_info": {
"current_level": 5,
"current_min": 0,
"current_exp": 0,
"next_exp": 0
},
"pendant": {
"pid": 0,
"name": "",
"image": "",
"expire": 0,
"image_enhance": ""
},
"nameplate": {
"nid": 74,
"name": "大会员2018年度勋章",
"image": "http://i1.hdslb.com/bfs/face/421179426c929dfeaed4117461c83f5d07ffb148.png",
"image_small": "http://i0.hdslb.com/bfs/face/682001c2e1c2ae887bdf2a0e18eef61180c48f84.png",
"level": "稀有勋章",
"condition": "2018.6.26-7.8某一天是年度大会员"
},
"official_verify": {
"type": -1,
"desc": ""
},
"vip": {
"vipType": 2,
"vipDueDate": 1620403200000,
"dueRemark": "",
"accessStatus": 0,
"vipStatus": 1,
"vipStatusWarn": "",
"themeType": 0,
"label": {
"path": "",
"text": "年度大会员",
"label_theme": "annual_vip"
}
},
"fans_detail": null,
"following": 0,
"is_followed": 0,
"user_sailing": {
"pendant": null,
"cardbg": null,
"cardbg_with_focus": null
}
},
"content": {
"message": "可怜的二楼(=・ω・=)",
"plat": 2,
"device": "",
"members": [],
"jump_url": {},
"max_line": 0
},
"replies": null,
"assist": 0,
"folder": {
"has_folded": false,
"is_folded": false,
"rule": ""
},
"up_action": {
"like": false,
"reply": false
},
"show_follow": false
},
{
"rpid": 214198733,
"oid": 2,
"type": 1,
"mid": 18370638,
"root": 476670,
"parent": 476670,
"dialog": 214198733,
"count": 0,
"rcount": 0,
"state": 0,
"fansgrade": 0,
"attr": 0,
"ctime": 1488888369,
"rpid_str": "214198733",
"root_str": "476670",
"parent_str": "476670",
"like": 1189,
"action": 0,
"member": {
"mid": "18370638",
"uname": "初音ハク",
"sex": "保密",
"sign": "我是艾尔的利刃",
"avatar": "http://i0.hdslb.com/bfs/face/50b3a20369f4358beca8078ef6ac652093ce7414.jpg",
"rank": "10000",
"DisplayRank": "0",
"level_info": {
"current_level": 5,
"current_min": 0,
"current_exp": 0,
"next_exp": 0
},
"pendant": {
"pid": 0,
"name": "",
"image": "",
"expire": 0,
"image_enhance": ""
},
"nameplate": {
"nid": 74,
"name": "大会员2018年度勋章",
"image": "http://i1.hdslb.com/bfs/face/421179426c929dfeaed4117461c83f5d07ffb148.png",
"image_small": "http://i0.hdslb.com/bfs/face/682001c2e1c2ae887bdf2a0e18eef61180c48f84.png",
"level": "稀有勋章",
"condition": "2018.6.26-7.8某一天是年度大会员"
},
"official_verify": {
"type": -1,
"desc": ""
},
"vip": {
"vipType": 2,
"vipDueDate": 1620403200000,
"dueRemark": "",
"accessStatus": 0,
"vipStatus": 1,
"vipStatusWarn": "",
"themeType": 0,
"label": {
"path": "",
"text": "年度大会员",
"label_theme": "annual_vip"
}
},
"fans_detail": null,
"following": 0,
"is_followed": 0,
"user_sailing": {
"pendant": null,
"cardbg": null,
"cardbg_with_focus": null
}
},
"content": {
"message": "划了4千多条评论找到的啊ε=ε=(ノ≧∇≦)",
"plat": 2,
"device": "",
"members": [],
"jump_url": {},
"max_line": 0
},
"replies": null,
"assist": 0,
"folder": {
"has_folded": false,
"is_folded": false,
"rule": ""
},
"up_action": {
"like": false,
"reply": false
},
"show_follow": false
},
{
"rpid": 225269192,
"oid": 2,
"type": 1,
"mid": 15094738,
"root": 476670,
"parent": 476670,
"dialog": 225269192,
"count": 0,
"rcount": 0,
"state": 0,
"fansgrade": 0,
"attr": 0,
"ctime": 1490666434,
"rpid_str": "225269192",
"root_str": "476670",
"parent_str": "476670",
"like": 235,
"action": 0,
"member": {
"mid": "15094738",
"uname": "御坂妹妹10492號",
"sex": "保密",
"sign": "",
"avatar": "http://i1.hdslb.com/bfs/face/6484b0e77b554f43237c78f383199ad211e8b3bd.jpg",
"rank": "10000",
"DisplayRank": "0",
"level_info": {
"current_level": 6,
"current_min": 0,
"current_exp": 0,
"next_exp": 0
},
"pendant": {
"pid": 326,
"name": "圣诞节快乐",
"image": "http://i1.hdslb.com/bfs/face/b72dbf785e810e94fce2481265e71b6f16c64681.png",
"expire": 0,
"image_enhance": "http://i1.hdslb.com/bfs/face/b72dbf785e810e94fce2481265e71b6f16c64681.png"
},
"nameplate": {
"nid": 74,
"name": "大会员2018年度勋章",
"image": "http://i1.hdslb.com/bfs/face/421179426c929dfeaed4117461c83f5d07ffb148.png",
"image_small": "http://i2.hdslb.com/bfs/face/682001c2e1c2ae887bdf2a0e18eef61180c48f84.png",
"level": "稀有勋章",
"condition": "2018.6.26-7.8某一天是年度大会员"
},
"official_verify": {
"type": -1,
"desc": ""
},
"vip": {
"vipType": 2,
"vipDueDate": 1621958400000,
"dueRemark": "",
"accessStatus": 0,
"vipStatus": 1,
"vipStatusWarn": "",
"themeType": 0,
"label": {
"path": "",
"text": "年度大会员",
"label_theme": "annual_vip"
}
},
"fans_detail": null,
"following": 0,
"is_followed": 0,
"user_sailing": {
"pendant": {
"id": 326,
"name": "圣诞节快乐",
"image": "http://i0.hdslb.com/bfs/face/b72dbf785e810e94fce2481265e71b6f16c64681.png",
"jump_url": "",
"type": "vip"
},
"cardbg": null,
"cardbg_with_focus": null
}
},
"content": {
"message": "可怜二楼没人",
"plat": 2,
"device": "",
"members": [],
"jump_url": {},
"max_line": 0
},
"replies": null,
"assist": 0,
"folder": {
"has_folded": false,
"is_folded": false,
"rule": ""
},
"up_action": {
"like": false,
"reply": false
},
"show_follow": false
},
{
"rpid": 451059061,
"oid": 2,
"type": 1,
"mid": 41075238,
"root": 476670,
"parent": 476670,
"dialog": 451059061,
"count": 0,
"rcount": 0,
"state": 6,
"fansgrade": 1,
"attr": 4,
"ctime": 1508168753,
"rpid_str": "451059061",
"root_str": "476670",
"parent_str": "476670",
"like": 111,
"action": 0,
"member": {
"mid": "41075238",
"uname": "废爪萌狼",
"sex": "保密",
"sign": "赫萝是天!!!!!!!!!!!!!!!!",
"avatar": "http://i0.hdslb.com/bfs/face/4e3b1610b40d3901516b09ba6d593e8cf68cf8f1.jpg",
"rank": "10000",
"DisplayRank": "0",
"level_info": {
"current_level": 5,
"current_min": 0,
"current_exp": 0,
"next_exp": 0
},
"pendant": {
"pid": 0,
"name": "",
"image": "",
"expire": 0,
"image_enhance": ""
},
"nameplate": {
"nid": 61,
"name": "饭圈楷模",
"image": "http://i2.hdslb.com/bfs/face/5a90f715451325c642a6ac39e01195cb6d075734.png",
"image_small": "http://i0.hdslb.com/bfs/face/5bfc1b4fb3f4b411495dddb0b2127ad80f6fbcac.png",
"level": "普通勋章",
"condition": "当前持有粉丝勋章最高等级>=10级"
},
"official_verify": {
"type": -1,
"desc": ""
},
"vip": {
"vipType": 2,
"vipDueDate": 1643385600000,
"dueRemark": "",
"accessStatus": 0,
"vipStatus": 1,
"vipStatusWarn": "",
"themeType": 0,
"label": {
"path": "",
"text": "年度大会员",
"label_theme": "annual_vip"
}
},
"fans_detail": {
"uid": 41075238,
"medal_id": 29058,
"medal_name": "逸国",
"score": 0,
"level": 3,
"intimacy": 0,
"master_status": 1,
"is_receive": 1
},
"following": 0,
"is_followed": 0,
"user_sailing": {
"pendant": null,
"cardbg": null,
"cardbg_with_focus": null
}
},
"content": {
"message": "好可怜啊(=・ω・=)",
"plat": 2,
"device": "",
"members": [],
"jump_url": {},
"max_line": 0
},
"replies": null,
"assist": 0,
"folder": {
"has_folded": false,
"is_folded": false,
"rule": ""
},
"up_action": {
"like": false,
"reply": false
},
"show_follow": false
},
{
"rpid": 451154733,
"oid": 2,
"type": 1,
"mid": 15094738,
"root": 476670,
"parent": 451059061,
"dialog": 451059061,
"count": 0,
"rcount": 0,
"state": 6,
"fansgrade": 0,
"attr": 4,
"ctime": 1508175639,
"rpid_str": "451154733",
"root_str": "476670",
"parent_str": "451059061",
"like": 107,
"action": 0,
"member": {
"mid": "15094738",
"uname": "御坂妹妹10492號",
"sex": "保密",
"sign": "",
"avatar": "http://i1.hdslb.com/bfs/face/6484b0e77b554f43237c78f383199ad211e8b3bd.jpg",
"rank": "10000",
"DisplayRank": "0",
"level_info": {
"current_level": 6,
"current_min": 0,
"current_exp": 0,
"next_exp": 0
},
"pendant": {
"pid": 326,
"name": "圣诞节快乐",
"image": "http://i1.hdslb.com/bfs/face/b72dbf785e810e94fce2481265e71b6f16c64681.png",
"expire": 0,
"image_enhance": "http://i1.hdslb.com/bfs/face/b72dbf785e810e94fce2481265e71b6f16c64681.png"
},
"nameplate": {
"nid": 74,
"name": "大会员2018年度勋章",
"image": "http://i1.hdslb.com/bfs/face/421179426c929dfeaed4117461c83f5d07ffb148.png",
"image_small": "http://i2.hdslb.com/bfs/face/682001c2e1c2ae887bdf2a0e18eef61180c48f84.png",
"level": "稀有勋章",
"condition": "2018.6.26-7.8某一天是年度大会员"
},
"official_verify": {
"type": -1,
"desc": ""
},
"vip": {
"vipType": 2,
"vipDueDate": 1621958400000,
"dueRemark": "",
"accessStatus": 0,
"vipStatus": 1,
"vipStatusWarn": "",
"themeType": 0,
"label": {
"path": "",
"text": "年度大会员",
"label_theme": "annual_vip"
}
},
"fans_detail": null,
"following": 0,
"is_followed": 0,
"user_sailing": {
"pendant": {
"id": 326,
"name": "圣诞节快乐",
"image": "http://i0.hdslb.com/bfs/face/b72dbf785e810e94fce2481265e71b6f16c64681.png",
"jump_url": "",
"type": "vip"
},
"cardbg": null,
"cardbg_with_focus": null
}
},
"content": {
"message": "回复 @负能量使者:你你你..你是怎么找到这里来的Σ(゚д゚;)",
"plat": 2,
"device": "",
"members": [],
"jump_url": {},
"max_line": 0
},
"replies": null,
"assist": 0,
"folder": {
"has_folded": false,
"is_folded": false,
"rule": ""
},
"up_action": {
"like": false,
"reply": false
},
"show_follow": false
}
],
"root": {
"rpid": 476670,
"oid": 2,
"type": 1,
"mid": 58426,
"root": 0,
"parent": 0,
"dialog": 0,
"count": 1893,
"rcount": 1843,
"state": 0,
"fansgrade": 0,
"attr": 0,
"ctime": 1291350931,
"rpid_str": "476670",
"root_str": "0",
"parent_str": "0",
"like": 53759,
"action": 0,
"member": {
"mid": "58426",
"uname": "残星什么的就是残星",
"sex": "男",
"sign": "少说话多做事 _微博@残星",
"avatar": "http://i1.hdslb.com/bfs/face/56ac36b37662e3746228f30eb4acf2cd332b66a5.jpg",
"rank": "20000",
"DisplayRank": "0",
"level_info": {
"current_level": 6,
"current_min": 0,
"current_exp": 0,
"next_exp": 0
},
"pendant": {
"pid": 0,
"name": "",
"image": "",
"expire": 0,
"image_enhance": ""
},
"nameplate": {
"nid": 30,
"name": "字幕君",
"image": "http://i1.hdslb.com/bfs/face/383c3fed3dc162c93a8d616a272693f6650e98f1.png",
"image_small": "http://i1.hdslb.com/bfs/face/7ad18084e40b725210e22696e0efdae408cd378c.png",
"level": "稀有勋章",
"condition": "弹幕大赛获得"
},
"official_verify": {
"type": -1,
"desc": ""
},
"vip": {
"vipType": 1,
"vipDueDate": 1550851200000,
"dueRemark": "",
"accessStatus": 0,
"vipStatus": 0,
"vipStatusWarn": "",
"themeType": 0,
"label": {
"path": "",
"text": "",
"label_theme": ""
}
},
"fans_detail": null,
"following": 0,
"is_followed": 0,
"user_sailing": {
"pendant": null,
"cardbg": null,
"cardbg_with_focus": null
}
},
"content": {
"message": "貌似没人来",
"plat": 1,
"device": "",
"members": [],
"jump_url": {},
"max_line": 0
},
"replies": null,
"assist": 0,
"folder": {
"has_folded": false,
"is_folded": false,
"rule": "https://www.bilibili.com/blackboard/foldingreply.html"
},
"up_action": {
"like": false,
"reply": false
},
"show_follow": false
},
"show_bvid": true,
"upper": {
"mid": 2
}
}
}
```