diff --git a/README.md b/README.md index b31c857..85fea2a 100644 --- a/README.md +++ b/README.md @@ -34,9 +34,10 @@ - 密码&短信登录 - qq&微博登录 - [登录基本信息](login/login_info.md)√ - - [消息](login/msg.md)x - - [私信](login/private_msg.md)x - [个人中心](login/member_center.md)× +- [消息](msg) + - [通知类消息](msg/msg.md)× + - [私信](msg/private_msg.md)× - [用户](user) - [基本信息](user/info.md)√ - [状态数](user/status_number.md)√ @@ -123,6 +124,7 @@ - 直播间操作 - 直播视频流 - 直播信息流 +- 答题 - B币钱包 - 基本信息 - B币充值 diff --git a/comment/action.md b/comment/action.md index 6d01d66..5334b7e 100644 --- a/comment/action.md +++ b/comment/action.md @@ -1,13 +1,13 @@ # 评论区操作 +**本页所有操作均需登录(SESSDATA)** + ## 发表评论 > http://api.bilibili.com/x/v2/reply/add *方式:POST* -需要登录(SESSDATA) - **正文参数( application/x-www-form-urlencoded ):** | 参数名 | 类型 | 内容 | 必要性 | 备注 | @@ -26,7 +26,7 @@ | 字段 | 类型 | 内容 | 备注 | | ------- | ----------------------------- | -------- | ------------------------------------------------------------ | -| code | num | 返回值 | 0:成功
-101:账号未登录
-102:账号被封停
-111:csrf校验失败
-400:请求错误
-404:无此项
12002:评论区已关闭
12009:评论主体的type不合法
12025:评论字数过多
**(其他错误码有待补充)** | +| code | num | 返回值 | 0:成功
-101:账号未登录
-102:账号被封停
-111:csrf校验失败
-400:请求错误
-404:无此项
12002:评论区已关闭
12006:没有该评论
12009:评论主体的type不合法
12025:评论字数过多
**(其他错误码有待补充)** | | message | str | 错误信息 | 默认为0 | | ttl | num | 1 | **作用尚不明确** | | data | 正确时:obj
错误时:null | 数据本体 | | @@ -210,3 +210,91 @@ curl -b "SESSDATA=xxx" -d "type=1&oid=243322853&message=%E6%B5%8B%E8%AF%95test%5 } ``` + + +## 点赞评论 + +> http://api.bilibili.com/x/v2/reply/action + +*方式:POST* + +点赞成功后会同时消去该评论的点踩 + +**正文参数( application/x-www-form-urlencoded ):** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ------------------- | ------ | ----------------------------------------------- | +| type | num | 评论区类型代码 | 必要 | **类型代码见「[评论区明细](comment_list.md)」** | +| oid | num | 目标评论区ID | 必要 | | +| rpid | num | 目标评论ID | 必要 | | +| action | num | 操作代码 | 非必要 | 默认为0
0:取消赞
1:点赞 | +| csrf | str | cookies中的bili_jct | 必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-102:账号被封停
-111:csrf校验失败
-400:请求错误
-404:无此项
12002:评论区已关闭
12006:没有该评论
12009:评论主体的type不合法
12011:不合法的赞或踩
**(其他错误码有待补充)** | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | **作用尚不明确** | + +**示例:** + +点赞视频`av243322853`下评论`3039053308` + +curl -b "SESSDATA=xxx" -d "type=1&oid=243322853&rpid=3039053308&action=1&csrf=xxx" "http://api.bilibili.com/x/v2/reply/action" + +```json +{ + "code": 0, + "message": "0", + "ttl": 1 +} +``` + + + +## 点踩评论 + +> http://api.bilibili.com/x/v2/reply/hate + +*方式:POST* + +点踩成功后会同时消去该评论的点赞 + +**正文参数( application/x-www-form-urlencoded ):** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ------------------- | ------ | ----------------------------------------------- | +| type | num | 评论区类型代码 | 必要 | **类型代码见「[评论区明细](comment_list.md)」** | +| oid | num | 目标评论区ID | 必要 | | +| rpid | num | 目标评论ID | 必要 | | +| action | num | 操作代码 | 非必要 | 默认为0
0:取消踩
1:点踩 | +| csrf | str | cookies中的bili_jct | 必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-102:账号被封停
-111:csrf校验失败
-400:请求错误
-404:无此项
12002:评论区已关闭
12006:没有该评论
12009:评论主体的type不合法
12011:不合法的赞或踩
**(其他错误码有待补充)** | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | **作用尚不明确** | + +**示例:** + +点踩视频`av243322853`下评论`3039053308` + +curl -b "SESSDATA=xxx" -d "type=1&oid=243322853&rpid=3039053308&action=1&csrf=xxx" "http://api.bilibili.com/x/v2/reply/hate" + +```json +{ + "code": 0, + "message": "0", + "ttl": 1 +} +``` + diff --git a/login/msg.md b/msg/msg.md similarity index 100% rename from login/msg.md rename to msg/msg.md diff --git a/login/private_msg.md b/msg/private_msg.md similarity index 100% rename from login/private_msg.md rename to msg/private_msg.md