返回提交历史
Modified
README.md
+1
-1
Modified
comment/action.md
+47
-1
XFEstudio/bilibili-API-collect
添加置顶评论
70e2afd
代码差异
2 个文件
+48
-2
@@ -86,7 +86,7 @@
86
86
- 仲裁信息
87
87
- [评论区](comment)
88
88
- [评论区明细](comment/comment_list.md)√
89
- [操作](comment/action.md)×
89
- [操作](comment/action.md)√
90
90
- 表情
91
91
- [创作中心](creativecenter)
92
92
- [统计与数据](creativecenter/statistics&data.md)x
@@ -2,6 +2,8 @@
2
2
3
3
**本页所有操作均需登录(SESSDATA)**
4
4
5
使用该登录token进行评论用户识别与操作鉴权
6
5
7
## 发表评论
6
8
7
9
> http://api.bilibili.com/x/v2/reply/add
@@ -331,7 +333,51 @@ curl -b "SESSDATA=xxx" -d "type=1&oid=243322853&rpid=3039053308&action=1&csrf=xx
331
333
332
334
删除`av243322853`下评论`rpID=3039053308`
333
335
334
curl -b "SESSDATA=xxx" -d "type=1&oid=3039053308&csrf=xxx" "http://api.bilibili.com/x/v2/reply/del"
336
curl -b "SESSDATA=xxx" -d "type=1&oid=243322853&rpid=3039053308&csrf=xxx" "http://api.bilibili.com/x/v2/reply/del"
337
338
```json
339
{
340
"code": 0,
341
"message": "0",
342
"ttl": 1
343
}
344
```
345
346
347
348
## 置顶评论
349
350
> http://api.bilibili.com/x/v2/reply/top
351
352
*方式:POST*
353
354
只能置顶自己管理的评论区中的一级评论
355
356
**正文参数( application/x-www-form-urlencoded ):**
357
358
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
359
| ------ | ---- | ------------------- | ------ | ----------------------------------------------- |
360
| type | num | 评论区类型代码 | 必要 | **类型代码见「[评论区明细](comment_list.md)」** |
361
| oid | num | 目标评论区ID | 必要 | |
362
| rpid | num | 目标评论rpID | 必要 | |
363
| action | num | 操作代码 | 非必要 | 默认为0<br />0:取消置顶<br />1:设为置顶 |
364
| csrf | str | cookies中的bili_jct | 必要 | |
365
366
**json回复:**
367
368
根对象:
369
370
| 字段 | 类型 | 内容 | 备注 |
371
| ------- | ---- | -------- | ------------------------------------------------------------ |
372
| code | num | 返回值 | 0:成功<br />-101:账号未登录<br />-102:账号被封停<br />-111:csrf校验失败<br />-400:请求错误<br />-403:权限不足<br />-404:无此项<br />12002:评论区已关闭<br />12006:没有该评论<br />12009:评论主体的type不合法<br />12029:已经有置顶评论<br />12030:不能置顶非一级评论<br />**(其他错误码有待补充)** |
373
| message | str | 错误信息 | 默认为0 |
374
| ttl | num | 1 | **作用尚不明确** |
375
376
**示例:**
377
378
置顶视频`av243322853`下评论`rpID=2940645593`
379
380
curl -b "SESSDATA=xxx" -d "type=1&oid=243322853&rpid=2940645593&action=1&csrf=xxx" "http://api.bilibili.com/x/v2/reply/top"
335
381
336
382
```json
337
383
{