mirror of
https://github.com/SocialSisterYi/bilibili-API-collect.git
synced 2025-03-29 09:20:07 +08:00
添加评论点赞与点踩 修改README
This commit is contained in:
parent
a38b184f4d
commit
242076ee49
@ -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币充值
|
||||
|
@ -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:成功<br />-101:账号未登录<br />-102:账号被封停<br />-111:csrf校验失败<br />-400:请求错误<br />-404:无此项<br />12002:评论区已关闭<br />12009:评论主体的type不合法<br />12025:评论字数过多<br />**(其他错误码有待补充)** |
|
||||
| code | num | 返回值 | 0:成功<br />-101:账号未登录<br />-102:账号被封停<br />-111:csrf校验失败<br />-400:请求错误<br />-404:无此项<br />12002:评论区已关闭<br />12006:没有该评论<br />12009:评论主体的type不合法<br />12025:评论字数过多<br />**(其他错误码有待补充)** |
|
||||
| message | str | 错误信息 | 默认为0 |
|
||||
| ttl | num | 1 | **作用尚不明确** |
|
||||
| data | 正确时:obj<br />错误时: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<br />0:取消赞<br />1:点赞 |
|
||||
| csrf | str | cookies中的bili_jct | 必要 | |
|
||||
|
||||
**json回复:**
|
||||
|
||||
根对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ------- | ---- | -------- | ------------------------------------------------------------ |
|
||||
| code | num | 返回值 | 0:成功<br />-101:账号未登录<br />-102:账号被封停<br />-111:csrf校验失败<br />-400:请求错误<br />-404:无此项<br />12002:评论区已关闭<br />12006:没有该评论<br />12009:评论主体的type不合法<br />12011:不合法的赞或踩<br />**(其他错误码有待补充)** |
|
||||
| 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<br />0:取消踩<br />1:点踩 |
|
||||
| csrf | str | cookies中的bili_jct | 必要 | |
|
||||
|
||||
**json回复:**
|
||||
|
||||
根对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ------- | ---- | -------- | ------------------------------------------------------------ |
|
||||
| code | num | 返回值 | 0:成功<br />-101:账号未登录<br />-102:账号被封停<br />-111:csrf校验失败<br />-400:请求错误<br />-404:无此项<br />12002:评论区已关闭<br />12006:没有该评论<br />12009:评论主体的type不合法<br />12011:不合法的赞或踩<br />**(其他错误码有待补充)** |
|
||||
| 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
|
||||
}
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user