diff --git a/README.md b/README.md index 85fea2a..ded280a 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ - 仲裁信息 - [评论区](comment) - [评论区明细](comment/comment_list.md)√ - - [操作](comment/action.md)× + - [操作](comment/action.md)√ - 表情 - [创作中心](creativecenter) - [统计与数据](creativecenter/statistics&data.md)x diff --git a/comment/action.md b/comment/action.md index f7fb50d..62405f1 100644 --- a/comment/action.md +++ b/comment/action.md @@ -2,6 +2,8 @@ **本页所有操作均需登录(SESSDATA)** +使用该登录token进行评论用户识别与操作鉴权 + ## 发表评论 > 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 删除`av243322853`下评论`rpID=3039053308` -curl -b "SESSDATA=xxx" -d "type=1&oid=3039053308&csrf=xxx" "http://api.bilibili.com/x/v2/reply/del" +curl -b "SESSDATA=xxx" -d "type=1&oid=243322853&rpid=3039053308&csrf=xxx" "http://api.bilibili.com/x/v2/reply/del" + +```json +{ + "code": 0, + "message": "0", + "ttl": 1 +} +``` + + + +## 置顶评论 + +> http://api.bilibili.com/x/v2/reply/top + +*方式:POST* + +只能置顶自己管理的评论区中的一级评论 + +**正文参数( application/x-www-form-urlencoded ):** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ------------------- | ------ | ----------------------------------------------- | +| type | num | 评论区类型代码 | 必要 | **类型代码见「[评论区明细](comment_list.md)」** | +| oid | num | 目标评论区ID | 必要 | | +| rpid | num | 目标评论rpID | 必要 | | +| action | num | 操作代码 | 非必要 | 默认为0
0:取消置顶
1:设为置顶 | +| csrf | str | cookies中的bili_jct | 必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-102:账号被封停
-111:csrf校验失败
-400:请求错误
-403:权限不足
-404:无此项
12002:评论区已关闭
12006:没有该评论
12009:评论主体的type不合法
12029:已经有置顶评论
12030:不能置顶非一级评论
**(其他错误码有待补充)** | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | **作用尚不明确** | + +**示例:** + +置顶视频`av243322853`下评论`rpID=2940645593` + +curl -b "SESSDATA=xxx" -d "type=1&oid=243322853&rpid=2940645593&action=1&csrf=xxx" "http://api.bilibili.com/x/v2/reply/top" ```json {