mirror of
https://github.com/SocialSisterYi/bilibili-API-collect.git
synced 2024-12-27 13:00:29 +08:00
增加点赞视频API (#98)
This commit is contained in:
parent
cab523075a
commit
463f769e0f
@ -86,7 +86,7 @@ PS:所有http协议地址均可使用https,文档中为了统一写作`http`
|
||||
- [专栏](article)
|
||||
- 分区
|
||||
- [基本信息](article/info.md)×
|
||||
- [点赞&投币&收藏](article/like_coin_fav.md)×
|
||||
- [点赞&投币&收藏&分享](article/like_coin_fav.md)×
|
||||
- [文集基本信息](article/articles.md)×
|
||||
- [音频](audio)
|
||||
- [歌曲基本信息](audio/info.md)√
|
||||
|
@ -28,7 +28,7 @@
|
||||
根对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ------- | ---- | -------- | ------------------------------------------------------------ |
|
||||
| ------- | ---- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| code | num | 返回值 | 0:成功 <br />-101:账号未登录<br />-111:csrf校验失败<br />-400:请求错误<br />10003:不存在该稿件<br />65004:取消点赞失败<br />65006:重复点赞 |
|
||||
| message | str | 错误信息 | 默认为0 |
|
||||
| ttl | num | 1 | |
|
||||
@ -91,7 +91,7 @@ curl 'http://api.bilibili.com/x/web-interface/archive/like' \
|
||||
根对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ------- | ---- | -------- | ------------------------------------------------------------ |
|
||||
| ------- | ---- | -------- | --------------------------------------------------------------------------- |
|
||||
| code | num | 返回值 | 0:成功 <br />-101:账号未登录<br />-400:请求错误<br />10003:不存在该稿件 |
|
||||
| message | str | 错误信息 | 默认为0 |
|
||||
| ttl | num | 1 | |
|
||||
@ -219,7 +219,7 @@ curl -G 'api.bilibili.com/x/web-interface/archive/has/like' \
|
||||
根对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ------- | ---- | -------- | ------------------------------------------------------------ |
|
||||
| ------- | ---- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| code | num | 返回值 | 0:成功<br />-101:账号未登录<br />-102:账号被封停<br />-104:硬币不足<br />-111:csrf校验失败<br />-400:请求错误<br />10003:不存在该稿件<br />34002:不能给自己投币<br />34003:非法的投币数量<br />34004:投币间隔太短<br />34005:超过投币上限 |
|
||||
| message | str | 错误信息 | 默认为0 |
|
||||
| ttl | num | 1 | |
|
||||
@ -295,7 +295,7 @@ curl 'http://api.bilibili.com/x/web-interface/coin/add' \
|
||||
根对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ------- | ---- | -------- | ------------------------------------------------------------ |
|
||||
| ------- | ---- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| code | num | 返回值 | 0:成功<br />-101:账号未登录<br />-102:账号被封停<br />-104:硬币不足<br />-400:请求错误<br />10003:不存在该稿件<br />34002:不能给自己投币<br />34003:非法的投币数量<br />34004:投币间隔太短<br />34005:超过投币上限 |
|
||||
| message | str | 错误信息 | 默认为0 |
|
||||
| ttl | num | 1 | |
|
||||
@ -434,7 +434,7 @@ curl -G 'api.bilibili.com/x/web-interface/archive/coins' \
|
||||
根对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ------- | ---- | -------- | ------------------------------------------------------------ |
|
||||
| ------- | ---- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| code | num | 返回值 | 0:成功<br />-101:账号未登录<br />-111:csrf校验失败<br />-400:请求错误<br />-403:访问权限不足<br />10003:不存在该稿件<br />11201:已经收藏过了<br />11202:已经取消收藏了<br />11203:达到收藏上限<br />72010017:参数错误 |
|
||||
| message | str | 错误信息 | 正确为success |
|
||||
| data | obj | 信息本体 | |
|
||||
@ -585,7 +585,7 @@ curl -G 'http://api.bilibili.com/x/v2/fav/video/favoured' \
|
||||
根对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ------- | ---- | -------- | ------------------------------------------------------------ |
|
||||
| ------- | ---- | -------- | -------------------------------------------------------------------------------------------------- |
|
||||
| code | num | 返回值 | 0:成功<br />-101:账号未登录<br />-111:csrf校验失败<br />-400:请求错误<br />10003:不存在该稿件 |
|
||||
| message | str | 错误信息 | 默认为0 |
|
||||
| ttl | num | 1 | |
|
||||
@ -663,7 +663,7 @@ curl 'http://api.bilibili.com/x/web-interface/archive/like/triple' \
|
||||
根对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ------- | ---- | -------- | ------------------------------------------------------------ |
|
||||
| ------- | ---- | -------- | -------------------------------------------------------------------------- |
|
||||
| code | num | 返回值 | 0:成功<br />-101:账号未登录<br />-400:请求错误<br />10003:不存在该稿件 |
|
||||
| message | str | 错误信息 | 默认为0 |
|
||||
| ttl | num | 1 | |
|
||||
@ -706,3 +706,55 @@ curl 'http://app.bilibili.com/x/v2/view/like/triple' \
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### 分享视频 (Web端)
|
||||
|
||||
> https://api.bilibili.com/x/web-interface/share/add
|
||||
|
||||
*请求方式:POST*
|
||||
|
||||
认证方式 csrf token
|
||||
|
||||
**正文参数( application/x-www-form-urlencoded ):**
|
||||
|
||||
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
|
||||
| ------ | ---- | ------------------------ | ------------ | ------------------ |
|
||||
| aid | num | 稿件avID | 必要(可选) | avID与bvID任选一个 |
|
||||
| bvid | str | 稿件bvID | 必要(可选) | avID与bvID任选一个 |
|
||||
| csrf | str | CSRF Token(位于cookie) | 必要 | |
|
||||
|
||||
**json回复:**
|
||||
|
||||
根对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ------- | ---- | ---------- | ------------------------------------------------------------------------- |
|
||||
| code | num | 返回值 | 0:成功<br />-101:账号未登录<br />-111:csrf校验失败<br />-400:请求错误 |
|
||||
| message | str | 错误信息 | 默认为0 |
|
||||
| ttl | num | 1 | |
|
||||
| data | num | 当前分享数 | |
|
||||
|
||||
|
||||
**示例:**
|
||||
|
||||
分享视频`BV1oA411776z`
|
||||
|
||||
```shell
|
||||
curl 'http://api.bilibili.com/x/web-interface/share/add' \
|
||||
--data-urlencode 'csrf=xxx' \
|
||||
--data-urlencode 'bvid=BV1oA411776z'
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>查看响应示例:</summary>
|
||||
|
||||
```json
|
||||
{
|
||||
"code":0,
|
||||
"message":"0",
|
||||
"ttl":1,
|
||||
"data":19
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
Loading…
Reference in New Issue
Block a user