mirror of
https://github.com/SocialSisterYi/bilibili-API-collect.git
synced 2025-01-16 06:40:05 +08:00
f41151b8e9
* 添加漫画签到接口
* 添加积分商城相关接口
* 添加基本兑换状态码
* fix format
* 添加新项
* 链接勘误
* 添加Java获取dev_id的示例
* Revert "添加Java获取dev_id的示例"
This reverts commit 125828bb
* 添加Java获取dev_id的示例
* 大会员权益信息更新
* 查询自己收到的充电列表
* 更新视频取流相关参数
* 签到请求地址更正
* 添加查询签到状态接口
* 补充用户信息字段
* 补充粉丝勋章信息字段说明
* 添加系统提示类型
* UPDATE
* UPDATE
* UPDATE
* 添加: 查询我收到的充电留言
* 添加: 查询充电留言详情
* 添加: 回复充电留言
* UPDATE
* UPDATE
Co-authored-by: 社会易姐QwQ <45892418+SocialSisterYi@users.noreply.github.com>
169 lines
4.3 KiB
Markdown
169 lines
4.3 KiB
Markdown
# 大会员兑换福利
|
||
|
||
- [大会员兑换福利](#大会员兑换福利)
|
||
- [兑换状态查询](#兑换状态查询)
|
||
- [兑换](#兑换)
|
||
|
||
---
|
||
|
||
## 卡券状态查询
|
||
|
||
> http://api.bilibili.com/x/vip/privilege/my
|
||
|
||
*请求方式:GET*
|
||
|
||
认证方式:Cookie(SESSDATA)或APP
|
||
|
||
**json回复:**
|
||
|
||
根对象:
|
||
|
||
| 字段 | 类型 | 内容 | 备注 |
|
||
| ------- | ---- | -------- | --------------------------- |
|
||
| code | num | 返回值 | -101:账号未登录<br />-400:请求错误<br />0:成功 |
|
||
| message | str | 错误信息 | |
|
||
| ttl | num | 1 | |
|
||
| data | obj | 信息本体 | |
|
||
|
||
`data`对象:
|
||
|
||
| 字段 | 类型 | 内容 | 备注 |
|
||
| ----- | -------|----------------|------ |
|
||
| list | array | 卡券列表 | |
|
||
| is_short_vip | bool | (?) | |
|
||
| is_freight_open | bool | (?) | |
|
||
|
||
`list`数组:
|
||
|
||
| 字段 | 类型 | 内容 | 备注 |
|
||
| ----- | -------|-----------------|------ |
|
||
| 0 | obj | B币兑换状态 | |
|
||
| 1 | obj | 会员购优惠券兑换状态 | |
|
||
| 2 | obj | 漫画福利券兑换状态 | |
|
||
| 3 | obj | 会员购运费券兑换状态 | |
|
||
|
||
`list`中的对象:
|
||
|
||
| 字段 | 类型 | 内容 | 备注 |
|
||
| -------------- | -----|------------------|------ |
|
||
| type | num | 卡券类型 | 1:B币<br />2:会员购优惠券<br />3:漫画福利券<br />4:会员购运费券 |
|
||
| state | num | 兑换状态 | 0:当月未兑换<br />1:已兑换 |
|
||
| expire_time | num | 当月过期时间 | 当月月底 |
|
||
| vip_type | num | | 2:年度大会员可兑换 |
|
||
| next_receive_days | num | 距下一轮兑换剩余天数 | |
|
||
| period_end_unix | num | 距下一轮兑换截止时间戳 | 秒级时间戳 |
|
||
|
||
|
||
**示例:**
|
||
|
||
```shell
|
||
curl -G 'http://api.bilibili.com/x/vip/privilege/my' \
|
||
-b "SESSDATA=xxx"
|
||
```
|
||
|
||
<details>
|
||
<summary>查看响应示例:</summary>
|
||
|
||
```json
|
||
{
|
||
"code": 0,
|
||
"message": "0",
|
||
"ttl": 1,
|
||
"data": {
|
||
"list": [
|
||
{
|
||
"type": 1,
|
||
"state": 1,
|
||
"expire_time": 1651334399,
|
||
"vip_type": 2,
|
||
"next_receive_days": 20,
|
||
"period_end_unix": 1651420800
|
||
},
|
||
{
|
||
"type": 2,
|
||
"state": 0,
|
||
"expire_time": 1651334399,
|
||
"vip_type": 2,
|
||
"next_receive_days": 20,
|
||
"period_end_unix": 1651420800
|
||
},
|
||
{
|
||
"type": 3,
|
||
"state": 1,
|
||
"expire_time": 1651334399,
|
||
"vip_type": 2,
|
||
"next_receive_days": 20,
|
||
"period_end_unix": 1651420800
|
||
},
|
||
{
|
||
"type": 4,
|
||
"state": 0,
|
||
"expire_time": 1651334399,
|
||
"vip_type": 2,
|
||
"next_receive_days": 20,
|
||
"period_end_unix": 1651420800
|
||
},
|
||
{
|
||
"type": 5,
|
||
"state": 0,
|
||
"expire_time": 1651334399,
|
||
"vip_type": 2,
|
||
"next_receive_days": 20,
|
||
"period_end_unix": 1651420800
|
||
}
|
||
],
|
||
"is_short_vip": false,
|
||
"is_freight_open": true
|
||
}
|
||
}
|
||
```
|
||
|
||
</details>
|
||
|
||
|
||
## 兑换
|
||
> http://api.bilibili.com/x/vip/privilege/receive
|
||
|
||
*请求方式:POST*
|
||
|
||
认证方式:Cookie(SESSDATA)
|
||
|
||
**正文参数:**
|
||
|
||
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
|
||
| ---------- | ---- | ---------- | -------- | ---------------------- |
|
||
| type | num | 兑换类型 | 必要 | 1:B币<br />2:会员购优惠券<br />3:漫画福利券<br />4:会员购运费券 |
|
||
| csrf | num | CSRF token | 必要 | Cookie bili_jct字段 |
|
||
|
||
**json回复:**
|
||
|
||
根对象:
|
||
|
||
| 字段 | 类型 | 内容 | 备注 |
|
||
| ------- | ---- | -------- | ------------------------------------------------------------ |
|
||
| code | num | 返回值 | -101:账号未登录<br />-111:csrf 校验失败<br />-400:请求错误<br />69800:网络繁忙 请稍后再试<br />69801:你已领取过该权益<br />0:成功 |
|
||
| message | str | 错误信息 | |
|
||
| ttl | num | 1 | |
|
||
|
||
**示例:**
|
||
|
||
```shell
|
||
curl 'http://api.bilibili.com/x/vip/privilege/receive' \
|
||
-b 'SESSDATA=xxx' \
|
||
--data-urlencode 'type=1' \
|
||
--data-urlencode 'csrf=csrf_token'
|
||
```
|
||
|
||
<details>
|
||
<summary>查看响应示例:</summary>
|
||
|
||
```json
|
||
{
|
||
"code": 0,
|
||
"message": "0",
|
||
"ttl": 1
|
||
}
|
||
```
|
||
|
||
</details>
|