From 490d4c5e1f4559e9fae0feb46e18364317a6112e Mon Sep 17 00:00:00 2001
From: wuziqian211 <65224318+wuziqian211@users.noreply.github.com>
Date: Mon, 27 Feb 2023 14:56:38 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8C=85=E6=9C=88?=
=?UTF-8?q?=E5=85=85=E7=94=B5=E5=8A=9F=E8=83=BD=E7=9B=B8=E5=85=B3API=20(#6?=
=?UTF-8?q?26)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* Update charge_list.md
* Update charge_msg.md
* Update relation.md
* Update relation.md
* update
* Update monthly.md
* Update monthly.md
* update
---
README.md | 5 +-
docs/electric/charge_list.md | 128 ++++++------
docs/electric/charge_msg.md | 4 +-
docs/electric/monthly.md | 373 +++++++++++++++++++++++++++++++++++
docs/user/relation.md | 123 ++++++++++--
5 files changed, 547 insertions(+), 86 deletions(-)
create mode 100644 docs/electric/monthly.md
diff --git a/README.md b/README.md
index 63caccc..4f791f1 100644
--- a/README.md
+++ b/README.md
@@ -168,8 +168,9 @@ B站 API 采用 C/S 结构,大多数接口为 REST API 和 gRPC,少部分接
- [x] [实时广播(通讯协议)](docs/broadcast)
- [x] [视频内广播](docs/broadcast/video_room.md)
- [ ] [充电](docs/electric)
- - [x] [B币方式](docs/electric/Bcoin.md)
- - [x] [微信 & 支付宝方式](docs/electric/WeChat&Alipay.md)
+ - [ ] [包月充电操作](docs/electric/monthly.md)
+ - [x] [自定义充电(B币方式)](docs/electric/Bcoin.md)
+ - [x] [自定义充电(微信 & 支付宝方式)](docs/electric/WeChat&Alipay.md)
- [x] [充电留言](docs/electric/charge_msg.md)
- [x] [充电列表](docs/electric/charge_list.md)
- [ ] [动态](docs/dynamic)
diff --git a/docs/electric/charge_list.md b/docs/electric/charge_list.md
index c5ea951..021889a 100644
--- a/docs/electric/charge_list.md
+++ b/docs/electric/charge_list.md
@@ -2,7 +2,7 @@
## 获取空间充电公示列表
-> https://elec.bilibili.com/api/query.rank.do
+> https://api.bilibili.com/x/ugcpay-rank/elec/month/up
*请求方式:GET*
@@ -10,27 +10,28 @@
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
| ------ | ---- | ----------- | ------ | ---- |
-| mid | num | 目标用户mid | 必要 | |
+| up_mid | num | 目标用户mid | 必要 | |
**json回复:**
根对象:
-| 字段 | 类型 | 内容 | 备注 |
-| ---- | ---- | -------- | ----------------------------- |
-| code | num | 返回值 | 0:成功
500011:mid错误 |
-| msg | str | 错误信息 | 正确时无此项 |
-| data | obj | 数据本体 | |
+| 字段 | 类型 | 内容 | 备注 |
+| ------- | ---- | -------- | ---------------------------- |
+| code | num | 返回值 | 0:成功
-400:请求错误 |
+| message | str | 错误信息 | |
+| ttl | num | 0 | |
+| data | obj | 数据本体 | |
`data`对象:
-| 字段 | 类型 | 内容 | 备注 |
-| ----------- | ------ | ---------------- | ------------ |
-| display_num | num | 0 | 作用尚不明确 |
-| count | num | 本月充电人数 | |
-| total_count | num | 总计充电人数 | |
+| 字段 | 类型 | 内容 | 备注 |
+| ----------- | ----- | ---------------- | ------------ |
+| count | num | 本月充电人数 | |
| list | array | 本月充电用户列表 | |
-| user | null | | 作用尚不明确 |
+| total_count | num | 总计充电次数 | |
+| total | num | 总计充电次数 | 同上 |
+| special_day | num | 0 | 作用尚不明确 |
`data`中的`list`数组:
@@ -43,32 +44,32 @@
`data`中的`list`数组中的对象:
-| 字段 | 类型 | 内容 | 备注 |
-| ----------- | ---- | ---------------- | ---------------- |
-| mid | num | 充电对象mid | |
-| pay_mid | num | 充电用户mid | |
-| rank | num | 充电用户排名 | 取决于充电的多少 |
-| uname | str | 充电用户昵称 | |
-| avatar | str | 充电用户头像url | |
-| message | str | 充电留言 | 无为空 |
-| msg_deleted | num | 0 | 作用尚不明确 |
-| vip_info | obj | 充电用户会员信息 | |
-| trend_type | num | 0 | 作用尚不明确 |
+| 字段 | 类型 | 内容 | 备注 |
+| ---------- | ---- | ---------------- | ---------------- |
+| uname | str | 充电用户昵称 | |
+| avatar | str | 充电用户头像url | |
+| mid | num | 充电对象mid | |
+| pay_mid | num | 充电用户mid | |
+| rank | num | 充电用户排名 | 取决于充电的多少 |
+| trend_type | num | 0 | 作用尚不明确 |
+| vip_info | obj | 充电用户会员信息 | |
+| message | str | 充电留言 | 无为空 |
+| msg_hidden | num | 0 | 作用尚不明确 |
-`data`中的`list`数组中的对象中的`vip_info`对象:
+`list`数组中的对象中的`vip_info`对象:
-| 字段 | 类型 | 内容 | 备注 |
-| ---------- | ---- | ---------- | ----------------------------------- |
-| vipType | num | 大会员类型 | 0:无
1:月会员
2:年会员 |
-| vipDueMsec | num | 0 | 作用尚不明确 |
-| vipStatus | num | 大会员状态 | 0:无
1:有 |
+| 字段 | 类型 | 内容 | 备注 |
+| ---------- | ---- | -------------------- | ----------------------------------------- |
+| vipDueMsec | num | 大会员过期时间(?) | 恒为0 |
+| vipStatus | num | 大会员状态 | 0:无
1:有 |
+| vipType | num | 大会员类型 | 0:无
1:月会员
2:年会员及以上 |
**示例:**
查询用户`mid=53456`的充电公示列表
```shell
-curl -G 'https://elec.bilibili.com/api/query.rank.do' \
+curl -G 'https://api.bilibili.com/x/ugcpay-rank/elec/month/up?up_mid=53456' \
--data-urlencode 'mid=53456'
```
@@ -78,59 +79,60 @@ curl -G 'https://elec.bilibili.com/api/query.rank.do' \
```json
{
"code": 0,
+ "message": "",
+ "ttl": 0,
"data": {
- "display_num": 0,
- "count": 226,
- "total_count": 11528,
+ "count": 397,
"list": [
{
+ "uname": "Mars韩笑",
+ "avatar": "https://i1.hdslb.com/bfs/face/a46599fa41cac672eda677e334f0be93cca02f1f.jpg",
"mid": 53456,
- "pay_mid": 346545025,
+ "pay_mid": 5683462,
"rank": 1,
- "uname": "还有什么名字没人用",
- "avatar": "http://i1.hdslb.com/bfs/face/76d4b1ecd13e992a6c7303d77bf716dd922ab234.jpg",
- "message": "早日康复,五月快乐",
- "msg_deleted": 0,
+ "trend_type": 0,
"vip_info": {
- "vipType": 2,
"vipDueMsec": 0,
- "vipStatus": 1
+ "vipStatus": 1,
+ "vipType": 2
},
- "trend_type": 0
+ "message": "你真棒,你是奇迹!(Warma真的是太棒了!",
+ "message_hidden": 0
},
{
+ "uname": "愚星-",
+ "avatar": "https://i1.hdslb.com/bfs/face/7e4a8b150567a20a1b075aa3894dd3674a1e6ebe.jpg",
"mid": 53456,
- "pay_mid": 8826056,
+ "pay_mid": 382630072,
"rank": 2,
- "uname": "煋痕",
- "avatar": "http://i2.hdslb.com/bfs/face/35b7c752d0eb1bb7a924804f240b9bfd9199625f.jpg",
- "message": "",
- "msg_deleted": 0,
+ "trend_type": 0,
"vip_info": {
- "vipType": 2,
"vipDueMsec": 0,
- "vipStatus": 1
+ "vipStatus": 1,
+ "vipType": 1
},
- "trend_type": 0
+ "message": "感谢您给我带来的快乐!我的人生遇见你是我的荣幸!!",
+ "message_hidden": 0
},
{
+ "uname": "なか酱",
+ "avatar": "https://i0.hdslb.com/bfs/face/d4b74091d7f1c336399625dc062ddc93d676bcdc.jpg",
"mid": 53456,
- "pay_mid": 356668487,
+ "pay_mid": 446080731,
"rank": 3,
- "uname": "舞象祥",
- "avatar": "http://i1.hdslb.com/bfs/face/574f6203ef5bd0d56b95ded6a2736676d9cc5307.jpg",
- "message": "warma hayo",
- "msg_deleted": 0,
+ "trend_type": 0,
"vip_info": {
- "vipType": 1,
"vipDueMsec": 0,
- "vipStatus": 1
+ "vipStatus": 1,
+ "vipType": 2
},
- "trend_type": 0
- },
- …………
+ "message": "",
+ "message_hidden": 0
+ }
],
- "user": null
+ "total_count": 27291,
+ "total": 27291,
+ "special_day": 0
}
}
```
@@ -434,8 +436,8 @@ curl -L -X GET 'https://pay.bilibili.com/bk/brokerage/listForCustomerRechargeRec
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
| -------- | ---- | -------- | ------ | -------------------------------- |
-| pn | num | 页数 | 必要 | |
-| ps | num | 分页大小 | 必要 | 取值范围[1,20] |
+| pn | num | 页数 | 非必要 | |
+| ps | num | 分页大小 | 非必要 | 取值范围[1,20] |
**json回复:**
diff --git a/docs/electric/charge_msg.md b/docs/electric/charge_msg.md
index d12ccc3..d9b8abf 100644
--- a/docs/electric/charge_msg.md
+++ b/docs/electric/charge_msg.md
@@ -164,7 +164,7 @@ curl -L -X GET 'https://member.bilibili.com/x/web/elec/remark/list?begin=2016-01
## 查询充电留言详情
-> https://member.bilibili.com/x/web/elec/remark/detail?id=6662619
+> https://member.bilibili.com/x/web/elec/remark/detail
认证方式:Cookie(SESSDATA)
@@ -293,4 +293,4 @@ curl -L -X POST 'https://member.bilibili.com/x/web/elec/remark/reply' \
}
```
-
\ No newline at end of file
+
diff --git a/docs/electric/monthly.md b/docs/electric/monthly.md
new file mode 100644
index 0000000..bf47c38
--- /dev/null
+++ b/docs/electric/monthly.md
@@ -0,0 +1,373 @@
+# 包月充电
+
+
+
+## UP主包月充电详情
+
+> https://api.bilibili.com/x/upower/item/detail
+
+*请求方式:GET*
+
+**url参数:**
+
+| 参数名 | 类型 | 内容 | 必要性 | 备注 |
+| ------ | ---- | ----------- | ------ | ---- |
+| up_mid | num | 目标用户mid | 必要 | |
+
+**json回复:**
+
+根对象:
+
+| 字段 | 类型 | 内容 | 备注 |
+| ------- | ---- | -------- | --------------------------------------------------------------- |
+| code | num | 返回值 | 0:成功
-400:请求错误
203101:UP主未开通包月充电功能 |
+| message | str | 错误信息 | 默认为0 |
+| ttl | num | 1 | |
+| data | obj | 信息本体 | |
+
+`data`对象:
+
+| 字段 | 类型 | 内容 | 备注 |
+| ----------- | ---- | ---------- | ---- |
+| upower_rank | obj | 充电详情 | |
+| item | obj | 充电欢迎语 | |
+| user_card | obj | UP主信息 | |
+
+`data`中的`upower_rank`对象:
+
+| 字段 | 类型 | 内容 | 备注 |
+| ---------- | ----- | ---------------- | ------------ |
+| total | num | 充电用户总数 | |
+| total_desc | str | 充电总数文字说明 | 示例:“1+” |
+| list | array | 充电用户列表 | 最多展示30个 |
+
+`upower_rank`中的`list`数组:
+
+| 项 | 类型 | 内容 | 备注 |
+| ---- | ---- | --------- | ---------------- |
+| 0 | obj | 用户1 | |
+| n | obj | 用户(n+1) | 按照充电时间排序 |
+| …… | obj | …… | …… |
+
+数组`list`中的对象:
+
+| 字段 | 类型 | 内容 | 备注 |
+| -------- | ---- | --------------- | ---- |
+| rank | num | 充电用户索引 | |
+| mid | num | 充电用户mid | |
+| nickname | str | 充电用户昵称 | |
+| avatar | str | 充电用户头像url | |
+
+`data`中的`item`对象:
+
+| 字段 | 类型 | 内容 | 备注 |
+| --------------- | ---- | ---------------- | ---- |
+| intro_video_aid | str | 充电介绍视频AV号 | |
+| welcomes | str | 充电介绍语 | |
+
+`data`中的`user_card`对象:
+
+| 字段 | 类型 | 内容 | 备注 |
+| -------- | ---- | ----------- | ---- |
+| avatar | str | UP主头像url | |
+| nickname | str | UP主昵称 | |
+
+**示例:**
+
+获取`mid=293793435`的包月充电详情
+
+
+```shell
+curl 'https://api.bilibili.com/x/upower/item/detail' \
+--data-urlencode 'up_mid=293793435' \
+-b 'SESSDATA=xxx'
+```
+
+
+查看响应示例:
+
+```json
+{
+ "code": 0,
+ "message": "0",
+ "ttl": 1,
+ "data": {
+ "upower_rank": {
+ "total": 1,
+ "total_desc": "1+",
+ "list": [
+ {
+ "rank": 1,
+ "mid": 425503913,
+ "nickname": "wuziqian211",
+ "avatar": "https://i2.hdslb.com/bfs/face/390f4b18b8b15c1f2ecdb6ee44e572aa18b9b2d0.png"
+ }
+ ]
+ },
+ "item": {
+ "intro_video_aid": "",
+ "welcomes": "哈喽b站的小伙伴们,我的充电计划升级啦! 感兴趣就多多支持我吧~(゜-゜)つロ"
+ },
+ "user_card": {
+ "avatar": "https://i0.hdslb.com/bfs/face/aebb2639a0d47f2ce1fec0631f412eaf53d4a0be.jpg",
+ "nickname": "社会易姐QwQ"
+ }
+ }
+}
+```
+
+
+
+## 与UP主的包月充电关系
+
+> https://api.bilibili.com/x/upower/charge/follow/info
+
+*请求方式:GET*
+
+认证方式:Cookie(SESSDATA)或APP
+
+**url参数:**
+
+| 参数名 | 类型 | 内容 | 必要性 | 备注 |
+| ------ | ---- | ----------- | ------ | ---- |
+| up_mid | num | 目标用户mid | 必要 | |
+
+**json回复:**
+
+根对象:
+
+| 字段 | 类型 | 内容 | 备注 |
+| ------- | ---- | -------- | ------------------------------------------------- |
+| code | num | 返回值 | 0:成功
-101:账号未登录
-400:请求错误 |
+| message | str | 错误信息 | 默认为0 |
+| ttl | num | 1 | |
+| data | obj | 信息本体 | |
+
+`data`对象:
+
+| 字段 | 类型 | 内容 | 备注 |
+| ---------------- | ---- | ------------------------ | ------------------------------------------- |
+| days | num | 已保持多少天包月充电状态 | |
+| up_card | obj | UP主信息 | |
+| user_card | obj | 自己的信息 | |
+| remain_days | num | 剩余天数 | 未处于包月充电状态为-1 |
+| remain_less_1day | num | 剩余的天数小于1天 | 0:否
1:是
未处于包月充电状态为0 |
+| upower_rank | obj | 充电详情 | |
+| upower_icon | str | 充电图标url | |
+
+`data`中的`up_card`对象:
+
+| 字段 | 类型 | 内容 | 备注 |
+| -------------- | ---- | ------------ | ---- |
+| nickname | str | UP主昵称 | |
+| official_title | str | UP主认证信息 | |
+| avatar | str | UP主头像url | |
+
+`data`中的`user_card`对象:
+
+| 字段 | 类型 | 内容 | 备注 |
+| -------- | ---- | ----------- | ---- |
+| avatar | str | 用户头像url | |
+| nickname | str | 用户昵称 | |
+
+`data`中的`upower_rank`对象:
+
+| 字段 | 类型 | 内容 | 备注 |
+| ---------- | ----- | ---------------- | ----------- |
+| total | num | 充电用户总数 | |
+| total_desc | str | 充电总数文字说明 | 示例:“1+” |
+| list | array | 充电用户列表 | 最多展示6个 |
+
+`upower_rank`中的`list`数组:
+
+| 项 | 类型 | 内容 | 备注 |
+| ---- | ---- | --------- | ---------------- |
+| 0 | obj | 用户1 | |
+| n | obj | 用户(n+1) | 按照充电时间排序 |
+| …… | obj | …… | …… |
+
+数组`list`中的对象:
+
+| 字段 | 类型 | 内容 | 备注 |
+| -------- | ---- | --------------- | ---- |
+| rank | num | 充电用户索引 | |
+| mid | num | 充电用户mid | |
+| nickname | str | 充电用户昵称 | |
+| avatar | str | 充电用户头像url | |
+
+**示例:**
+
+获取与`mid=293793435`的包月充电关系
+
+
+```shell
+curl 'https://api.bilibili.com/x/upower/charge/follow/info' \
+--data-urlencode 'up_mid=293793435' \
+-b 'SESSDATA=xxx'
+```
+
+
+查看响应示例:
+
+```json
+{
+ "code": 0,
+ "message": "0",
+ "ttl": 1,
+ "data": {
+ "days": 17,
+ "up_card": {
+ "nickname": "社会易姐QwQ",
+ "official_title": "",
+ "avatar": "https://i0.hdslb.com/bfs/face/aebb2639a0d47f2ce1fec0631f412eaf53d4a0be.jpg"
+ },
+ "user_card": {
+ "avatar": "https://i2.hdslb.com/bfs/face/390f4b18b8b15c1f2ecdb6ee44e572aa18b9b2d0.png",
+ "nickname": "wuziqian211"
+ },
+ "remain_days": 15,
+ "remain_less_1day": 0,
+ "upower_rank": {
+ "total": 1,
+ "total_desc": "1+",
+ "list": [
+ {
+ "rank": 1,
+ "mid": 425503913,
+ "nickname": "wuziqian211",
+ "avatar": "https://i2.hdslb.com/bfs/face/390f4b18b8b15c1f2ecdb6ee44e572aa18b9b2d0.png"
+ }
+ ]
+ },
+ "upower_icon": "https://i0.hdslb.com/bfs/garb/item/33e2e72d9a0c855f036b4cb55448f44af67a0635.png"
+ }
+}
+```
+
+
+
+## 包月充电用户排名
+
+> https://api.bilibili.com/x/upower/up/member/rank/v2
+
+*请求方式:GET*
+
+**url参数:**
+
+| 参数名 | 类型 | 内容 | 必要性 | 备注 |
+| ------ | ---- | ----------- | ------ | -------- |
+| up_mid | num | 目标用户mid | 必要 | |
+| ps | num | 每页项数 | 非必要 | 默认为20 |
+| pn | num | 页码 | 非必要 | 默认为1 |
+
+**json回复:**
+
+根对象:
+
+| 字段 | 类型 | 内容 | 备注 |
+| ------- | ---- | -------- | --------------------------- |
+| code | num | 返回值 | 0:成功
-400:请求错误 |
+| message | str | 错误信息 | 默认为0 |
+| ttl | num | 1 | |
+| data | obj | 信息本体 | |
+
+`data`对象:
+
+| 字段 | 类型 | 内容 | 备注 |
+| ------------ | ----- | ------------ | ---- |
+| up_info | obj | UP主信息 | |
+| rank_info | array | 充电用户排名 | |
+| user_info | obj | 自己的信息 | |
+| member_total | num | 充电用户总数 | |
+
+`data`中的`up_info`对象:
+
+| 字段 | 类型 | 内容 | 备注 |
+| -------- | ---- | ------------ | ---------------------------------------- |
+| mid | num | UP主mid | |
+| nickname | str | UP主昵称 | |
+| avatar | str | UP主头像url | |
+| type | num | UP主认证类型 | -1:无
0:UP主认证
1:机构认证 |
+| title | str | UP主认证信息 | |
+
+`data`中的`rank_info`数组:
+
+| 项 | 类型 | 内容 | 备注 |
+| ---- | ---- | --------- | ---------------- |
+| 0 | obj | 用户1 | |
+| n | obj | 用户(n+1) | 按照充电排名排列 |
+| …… | obj | …… | …… |
+
+数组`rank_info`中的对象:
+
+| 字段 | 类型 | 内容 | 备注 |
+| --------- | ---- | ---------------- | ----- |
+| mid | num | 充电用户mid | |
+| nickname | str | 充电用户昵称 | |
+| avatar | str | 充电用户头像url | |
+| rank | num | 充电用户排名 | |
+| day | num | 包月充电天数 | |
+| expire_at | num | 包月充电过期时间 | 恒为0 |
+
+`data`中的`user_info`对象:
+
+| 字段 | 类型 | 内容 | 备注 |
+| --------- | ---- | ---------------- | --------------------------------- |
+| mid | num | 用户mid | |
+| nickname | str | 用户昵称 | |
+| avatar | str | 用户头像url | |
+| rank | num | 包月充电排名 | 不在包月充电用户列表里为-1 |
+| day | num | 包月充电天数 | |
+| expire_at | num | 包月充电过期时间 | 单位为秒,若从未给UP主包月充电为0 |
+
+**示例:**
+
+获取给`mid=293793435`包月充电的用户排名
+
+
+```shell
+curl 'https://api.bilibili.com/x/upower/up/member/rank/v2' \
+--data-urlencode 'up_mid=293793435' \
+-b 'SESSDATA=xxx'
+```
+
+
+查看响应示例:
+
+```json
+{
+ "code": 0,
+ "message": "0",
+ "ttl": 1,
+ "data": {
+ "up_info": {
+ "mid": 293793435,
+ "nickname": "社会易姐QwQ",
+ "avatar": "https://i0.hdslb.com/bfs/face/aebb2639a0d47f2ce1fec0631f412eaf53d4a0be.jpg",
+ "type": -1,
+ "title": ""
+ },
+ "rank_info": [
+ {
+ "mid": 425503913,
+ "nickname": "wuziqian211",
+ "avatar": "https://i2.hdslb.com/bfs/face/390f4b18b8b15c1f2ecdb6ee44e572aa18b9b2d0.png",
+ "rank": 1,
+ "day": 31,
+ "expire_at": 0
+ }
+ ],
+ "user_info": {
+ "mid": 425503913,
+ "nickname": "wuziqian211",
+ "avatar": "https://i2.hdslb.com/bfs/face/390f4b18b8b15c1f2ecdb6ee44e572aa18b9b2d0.png",
+ "rank": 1,
+ "day": 31,
+ "expire_at": 1678723199
+ },
+ "member_total": 1
+ }
+}
+```
+
+
diff --git a/docs/user/relation.md b/docs/user/relation.md
index b85cc9d..375ed95 100644
--- a/docs/user/relation.md
+++ b/docs/user/relation.md
@@ -202,7 +202,7 @@ curl -G 'https://api.bilibili.com/x/relation/followers' \
| ttl | num | 1 | |
| data | obj | 信息本体 | |
-data 对象:
+`data`对象:
| 字段 | 类型 | 内容 | 备注 |
| ---------- | ----- | -------- | ------------ |
@@ -356,32 +356,28 @@ curl -G 'https://api.bilibili.com/x/relation/followings' \
*请求方式:GET*
-认证方式:Cookie(SESSDATA)或APP
-
-登录可看自己全部,其他用户仅可查看前5页,可以获取已设置可见性隐私的关注列表
+仅可查看前5页,可以获取已设置可见性隐私的关注列表
**url参数:**
-| 参数名 | 类型 | 内容 | 必要性 | 备注 |
-| ---------- | ---- | ------------ | ----------- | ------------------------------------------------------- |
-| access_key | str | APP登录Token | APP方式必要 | |
-| vmid | num | 目标用户mid | 必要 | |
-| order_type | str | 排序方式 | 非必要 | 按照关注顺序排列:留空
按照最常访问排列:attention |
-| ps | num | 每页项数 | 非必要 | 默认为50 |
-| pn | num | 页码 | 非必要 | 默认为1
其他用户仅可查看前5页 |
+| 参数名 | 类型 | 内容 | 必要性 | 备注 |
+| ---------- | ---- | ------------ | ------ | -------------------------- |
+| vmid | num | 目标用户mid | 必要 | |
+| ps | num | 每页项数 | 非必要 | 默认为50 |
+| pn | num | 页码 | 非必要 | 默认为1
仅可查看前5页 |
**json回复:**
根对象:
-| 字段 | 类型 | 内容 | 备注 |
-| ------- | ---- | -------- | ------------------------------------------------------------ |
+| 字段 | 类型 | 内容 | 备注 |
+| ------- | ---- | -------- | --------------------------------------------------- |
| code | num | 返回值 | 0:成功
-400:请求错误
22007:访问超过5页 |
-| message | str | 错误信息 | 默认为0 |
-| ttl | num | 1 | |
-| data | obj | 信息本体 | |
+| message | str | 错误信息 | 默认为0 |
+| ttl | num | 1 | |
+| data | obj | 信息本体 | |
-data 对象:
+`data`对象:
| 字段 | 类型 | 内容 | 备注 |
| ---------- | ----- | -------- | ------------ |
@@ -453,10 +449,8 @@ data 对象:
```shell
curl -G 'https://app.biliapi.net/x/v2/relation/followings' \
--data-urlencode 'vmid=293793435' \
---data-urlencode 'order_type=' \
--data-urlencode 'ps=2' \
--data-urlencode 'pn=1' \
--b 'SESSDATA=xxx'
```
@@ -527,6 +521,97 @@ curl -G 'https://app.biliapi.net/x/v2/relation/followings' \
+## 查询用户关注明细3
+
+
+
+> https://line3-h5-mobile-api.biligame.com/game/center/h5/user/relationship/following_list
+
+*请求方式:GET*
+
+可获取用户所有关注列表,对于设置了可见性隐私的用户会返回空列表
+
+**url参数:**
+
+| 参数名 | 类型 | 内容 | 必要性 | 备注 |
+| ------ | ---- | ------------ | ----------- | -------- |
+| vmid | num | 目标用户mid | 必要 | |
+| ps | num | 每页项数 | 非必要 | 默认为20 |
+| pn | num | 页码 | 非必要 | 默认为1 |
+
+**json回复:**
+
+根对象:
+
+| 字段 | 类型 | 内容 | 备注 |
+| ---------- | ---- | ---------- | --------------------------- |
+| code | num | 返回值 | 0:成功
-400:请求错误 |
+| message | str | 错误信息 | 成功时无此项 |
+| data | obj | 信息本体 | 失败时无此项 |
+| ts | num | 当前时间戳 | 单位为毫秒 |
+| request_id | str | 请求id | |
+
+`data`对象:
+
+| 字段 | 类型 | 内容 | 备注 |
+| ---------- | ----- | -------- | ------------ |
+| list | array | 明细列表 | |
+
+`data`中的`list`数组:
+
+| 项 | 类型 | 内容 | 备注 |
+| ---- | ---- | --------- | ---------------- |
+| 0 | obj | 关注1 | |
+| n | obj | 关注(n+1) | 按照关注顺序排列 |
+| …… | obj | …… | …… |
+
+数组`list`中的对象:
+
+| 字段 | 类型 | 内容 | 备注 |
+| --------------- | ---- | ----------- | --------------------------------------- |
+| mid | str | 用户mid | |
+| attribute | num | 关注属性 | 0:未关注
2:已关注
6:已互粉 |
+| uname | str | 用户昵称 | |
+| face | str | 用户头像url | |
+
+**示例:**
+
+获取用户`mid=293793435`的关注明细
+
+```shell
+curl -G 'https://line3-h5-mobile-api.biligame.com/game/center/h5/user/relationship/following_list' \
+--data-urlencode 'vmid=293793435' \
+--data-urlencode 'ps=2' \
+--data-urlencode 'pn=1' \
+-b 'SESSDATA=xxx'
+```
+
+
+查看响应示例:
+
+```json
+{
+ "code": 0,
+ "data": {
+ "list": [{
+ "mid": "14082",
+ "attribute": 2,
+ "uname": "山新",
+ "face": "https://i0.hdslb.com/bfs/face/74c82caee6d9eb623e56161ea8ed6d68afabfeae.jpg"
+ }, {
+ "mid": "420831218",
+ "attribute": 2,
+ "uname": "支付宝Alipay",
+ "face": "https://i2.hdslb.com/bfs/face/aaf18aeb2d9822e28a590bd8d878572ca8c59e04.jpg"
+ }]
+ },
+ "ts": 1677410818395,
+ "request_id": "d9d541b9f2d24e21821e2d6d2d16c17d"
+}
+```
+
+
+
## 搜索关注明细
From bea72b89edd11da9611fd1008809234c27b78ba8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=99=88=E5=AF=92=E5=BD=A4?=
<70561268+cxw620@users.noreply.github.com>
Date: Mon, 27 Feb 2023 17:38:26 +1030
Subject: [PATCH 2/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=B0=E7=9A=84grpc=5F?=
=?UTF-8?q?api=20proto(from=207.18.0)=20(#625)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* 添加新的proto(from 7.18.0)
* 修正包路径: playershared
* 修正import
---
.../interfacess/biligram/v1/biligram.proto | 1 +
.../dagw/component/avatar/common/common.proto | 1 +
.../dagw/component/avatar/v1/avatar.proto | 1 +
.../dynamic/interfaces/campus/v1/api.proto | 1 +
.../openplatform/apiserver/v1alpha1/api.proto | 1 +
.../pgc/gateway/player/v3/playurl.proto | 32 ++
.../bilibili/playershared/playershared.proto | 426 ++++++++++++++++++
.../polymer/contract/{v1 => }/contract.proto | 2 +-
.../bilibili/relation/interfaces/api.proto | 1 +
grpc_api/bilibili/render/render.proto | 1 +
.../{gaetway => gateway}/vega/v1/vega.proto | 0
11 files changed, 466 insertions(+), 1 deletion(-)
create mode 100644 grpc_api/bilibili/community/interfacess/biligram/v1/biligram.proto
create mode 100644 grpc_api/bilibili/dagw/component/avatar/common/common.proto
create mode 100644 grpc_api/bilibili/dagw/component/avatar/v1/avatar.proto
create mode 100644 grpc_api/bilibili/dynamic/interfaces/campus/v1/api.proto
create mode 100644 grpc_api/bilibili/pangu/gallery/v1/openplatform/apiserver/v1alpha1/api.proto
create mode 100644 grpc_api/bilibili/pgc/gateway/player/v3/playurl.proto
create mode 100644 grpc_api/bilibili/playershared/playershared.proto
rename grpc_api/bilibili/polymer/contract/{v1 => }/contract.proto (97%)
create mode 100644 grpc_api/bilibili/relation/interfaces/api.proto
create mode 100644 grpc_api/bilibili/render/render.proto
rename grpc_api/pgc/{gaetway => gateway}/vega/v1/vega.proto (100%)
diff --git a/grpc_api/bilibili/community/interfacess/biligram/v1/biligram.proto b/grpc_api/bilibili/community/interfacess/biligram/v1/biligram.proto
new file mode 100644
index 0000000..0ffdd02
--- /dev/null
+++ b/grpc_api/bilibili/community/interfacess/biligram/v1/biligram.proto
@@ -0,0 +1 @@
+// TODO
\ No newline at end of file
diff --git a/grpc_api/bilibili/dagw/component/avatar/common/common.proto b/grpc_api/bilibili/dagw/component/avatar/common/common.proto
new file mode 100644
index 0000000..0ffdd02
--- /dev/null
+++ b/grpc_api/bilibili/dagw/component/avatar/common/common.proto
@@ -0,0 +1 @@
+// TODO
\ No newline at end of file
diff --git a/grpc_api/bilibili/dagw/component/avatar/v1/avatar.proto b/grpc_api/bilibili/dagw/component/avatar/v1/avatar.proto
new file mode 100644
index 0000000..0ffdd02
--- /dev/null
+++ b/grpc_api/bilibili/dagw/component/avatar/v1/avatar.proto
@@ -0,0 +1 @@
+// TODO
\ No newline at end of file
diff --git a/grpc_api/bilibili/dynamic/interfaces/campus/v1/api.proto b/grpc_api/bilibili/dynamic/interfaces/campus/v1/api.proto
new file mode 100644
index 0000000..0ffdd02
--- /dev/null
+++ b/grpc_api/bilibili/dynamic/interfaces/campus/v1/api.proto
@@ -0,0 +1 @@
+// TODO
\ No newline at end of file
diff --git a/grpc_api/bilibili/pangu/gallery/v1/openplatform/apiserver/v1alpha1/api.proto b/grpc_api/bilibili/pangu/gallery/v1/openplatform/apiserver/v1alpha1/api.proto
new file mode 100644
index 0000000..0ffdd02
--- /dev/null
+++ b/grpc_api/bilibili/pangu/gallery/v1/openplatform/apiserver/v1alpha1/api.proto
@@ -0,0 +1 @@
+// TODO
\ No newline at end of file
diff --git a/grpc_api/bilibili/pgc/gateway/player/v3/playurl.proto b/grpc_api/bilibili/pgc/gateway/player/v3/playurl.proto
new file mode 100644
index 0000000..28374f9
--- /dev/null
+++ b/grpc_api/bilibili/pgc/gateway/player/v3/playurl.proto
@@ -0,0 +1,32 @@
+syntax = "proto3";
+
+package bilibili.pgc.gateway.player.v3;
+
+import "bilibili/playershared/playershared.proto";
+
+import "google/protobuf/any.proto";
+
+// 播放页信息-请求
+message PlayViewReq {
+ // 视频信息
+ bilibili.playershared.VideoVod vod = 1;
+ // 当前页spm
+ string spmid = 2;
+ // 上一页spm
+ string from_spmid = 3;
+ // 青少年模式
+ int32 teenagers_mode = 4;
+ //
+ map extra_content = 5;
+
+}
+
+// 播放页信息-响应
+message PlayViewReply {
+ bilibili.playershared.VodInfo vod_info = 1;
+ bilibili.playershared.PlayArcConf play_arc_conf = 2;
+ google.protobuf.Any supplement = 3;
+ bilibili.playershared.PlayArc play_arc = 4;
+ bilibili.playershared.QnTrialInfo qn_trial_info = 5;
+ bilibili.playershared.Event event = 6;
+}
\ No newline at end of file
diff --git a/grpc_api/bilibili/playershared/playershared.proto b/grpc_api/bilibili/playershared/playershared.proto
new file mode 100644
index 0000000..d272b7a
--- /dev/null
+++ b/grpc_api/bilibili/playershared/playershared.proto
@@ -0,0 +1,426 @@
+syntax = "proto3";
+
+package bilibili.playershared;
+
+
+message ArcConf {
+ bool is_support = 1;
+ bool disable = 2;
+ ExtraContent extra_connent = 3;
+ repeated int32 unsupport_scene = 4;
+}
+
+// 视频编码
+enum CodeType {
+ NOCODE = 0; //
+ CODE264 = 1; // H264
+ CODE265 = 2; // H265
+ CODEAV1 = 3; // AV1
+}
+
+// 功能类型
+enum ConfType {
+ NoType = 0;
+ FLIPCONF = 1;
+ CASTCONF = 2;
+ FEEDBACK = 3;
+ SUBTITLE = 4;
+ PLAYBACKRATE = 5;
+ TIMEUP = 6;
+ PLAYBACKMODE = 7;
+ SCALEMODE = 8;
+ BACKGROUNDPLAY = 9;
+ LIKE = 10;
+ DISLIKE = 11;
+ COIN = 12;
+ ELEC = 13;
+ SHARE = 14;
+ SCREENSHOT = 15;
+ LOCKSCREEN = 16;
+ RECOMMEND = 17;
+ PLAYBACKSPEED = 18;
+ DEFINITION = 19;
+ SELECTIONS = 20;
+ NEXT = 21;
+ EDITDM = 22;
+ SMALLWINDOW = 23;
+ SHAKE = 24;
+ OUTERDM = 25;
+ INNERDM = 26;
+ PANORAMA = 27;
+ DOLBY = 28;
+ COLORFILTER = 29;
+ LOSSLESS = 30;
+ FREYAENTER = 31;
+ FREYAFULLENTER = 32;
+ SKIPOPED = 33;
+ RECORDSCREEN = 34;
+ DUBBING = 35;
+ LISTEN = 36;
+}
+
+message ConfValue {
+ oneof value {
+ // dash流
+ int32 switch_val = 1;
+ // 分段流
+ int32 selected_val = 2;
+ }
+}
+
+message DeviceConf {
+ ConfValue conf_value = 1;
+}
+
+// DRM类型
+enum DrmTechType {
+ //
+ UNKNOWN_DRM = 0;
+ //
+ FAIR_PLAY = 1;
+ //
+ WIDE_VINE = 2;
+ // 哔哩哔哩自研DRM
+ BILI_DRM = 3;
+}
+
+// ? 错误码补充信息
+message ExtraContent {
+ //
+ string disable_reason = 1;
+ //
+ uint64 disable_code = 2;
+}
+
+// 播放历史
+message History {
+ // 播放进度
+ uint64 progress = 1;
+ //
+ string toast = 2;
+ //
+ uint64 last_play_cid = 3;
+}
+
+message PlayDeviceConf {
+ map arc_confs = 1;
+}
+
+// 错误码
+enum PlayErr {
+ NoErr = 0; //
+ WithMultiDeviceLoginErr = 1; // 管控类型的错误码
+}
+
+// 方案
+message Scheme {
+ enum ActionType {
+ UNKNOWN = 0;
+ SHOW_TOAST = 1;
+ }
+ ActionType action_type = 1;
+ string toast = 2;
+}
+
+//
+enum UnsupportScene {
+ //
+ UNKNOWN_SCENE = 0;
+ //
+ PREMIERE = 1;
+}
+
+// 视频类型
+enum VideoType {
+ UNKNOWN = 0;
+ // 用户生成内容
+ UGC = 1;
+ // 专业生产内容
+ PGC = 2;
+}
+
+// 视频流信息
+message Stream {
+ // 元数据
+ StreamInfo stream_info = 1;
+ // 流数据
+ oneof content {
+ // dash流
+ DashVideo dash_video = 2;
+ // 分段流
+ SegmentVideo segment_video = 3;
+ }
+}
+
+// 视频流信息: 元数据
+message StreamInfo {
+ // 清晰度
+ uint32 quality = 1;
+ // 格式
+ string format = 2;
+ // 格式描述
+ string description = 3;
+ // 错误码
+ uint32 err_code = 4;
+ // 不满足条件信息
+ StreamLimit limit = 5;
+ // 是否需要vip
+ bool need_vip = 6;
+ // 是否需要登录
+ bool need_login = 7;
+ // 是否完整
+ bool intact = 8;
+ // 是否非全二压
+ bool no_rexcode = 9;
+ // 清晰度属性位
+ int64 attribute = 10;
+ // 新版格式描述
+ string new_description = 11;
+ // 格式文字
+ string display_desc = 12;
+ // 新版格式描述备注
+ string superscript = 13;
+ //
+ bool vip_free = 14;
+ //
+ string subtitle = 15;
+ // 方案
+ Scheme scheme = 16;
+ // 支持drm
+ bool support_drm = 17;
+}
+
+// Dash条目
+message DashItem {
+ // 清晰度
+ uint32 id = 1;
+ // 主线流
+ string base_url = 2;
+ // 备用流
+ repeated string backup_url = 3;
+ // 带宽
+ uint32 bandwidth = 4;
+ // 编码id
+ uint32 codecid = 5;
+ // md5
+ string md5 = 6;
+ // 大小
+ uint64 size = 7;
+ // 帧率
+ string frame_rate = 8;
+ // DRM密钥
+ string widevine_pssh = 9;
+}
+
+// 视频流信息: dash流
+message DashVideo {
+ // 主线流
+ string base_url = 1;
+ // 备用流
+ repeated string backup_url = 2;
+ // 带宽
+ uint32 bandwidth = 3;
+ // 编码id
+ uint32 codecid = 4;
+ // md5
+ string md5 = 5;
+ // 大小
+ uint64 size = 6;
+ // 伴音质量id
+ uint32 audio_id = 7;
+ // 是否非全二压
+ bool no_rexcode = 8;
+ // 帧率
+ string frame_rate = 9;
+ // 宽
+ int32 width = 10;
+ // 高
+ int32 height = 11;
+ // DRM密钥
+ string widevine_pssh = 12;
+}
+
+// 视频流信息: 分段流
+message SegmentVideo {
+ repeated ResponseUrl segment = 1;
+}
+
+// 分段流条目
+message ResponseUrl {
+ // 分段序号
+ uint32 order = 1;
+ // 分段时长
+ uint64 length = 2;
+ // 分段大小
+ uint64 size = 3;
+ // 主线流
+ string url = 4;
+ // 备用流
+ repeated string backup_url = 5;
+ // md5
+ string md5 = 6;
+}
+
+// Dash Response, 未使用
+message ResponseDash {
+ repeated DashItem video = 1;
+ repeated DashItem audio = 2;
+}
+
+// 视频流信息: 流媒体元数据: 清晰度不满足条件信息
+message StreamLimit {
+ // 标题
+ string title = 1;
+ // 跳转地址
+ string uri = 2;
+ // 提示信息
+ string msg = 3;
+}
+
+
+// 播放页信息-请求: 音视频VOD
+message VideoVod {
+ // 视频aid
+ int32 aid = 1;
+ // 视频cid
+ int32 cid = 2;
+ // 清晰度
+ uint64 qn = 3;
+ // 视频流版本
+ int32 fnver = 4;
+ // 视频流格式
+ int32 fnval = 5;
+ // 下载模式
+ // 0:播放 1:flv下载 2:dash下载
+ uint32 download = 6;
+ // 流url强制是用域名
+ // 0:允许使用ip 1:使用http 2:使用https
+ int32 force_host = 7;
+ // 是否4K
+ bool fourk = 8;
+ // 视频编码
+ CodeType prefer_codec_type = 9;
+ // 响度均衡
+ uint64 voice_balance = 10;
+}
+
+// 播放页信息-响应: VOD音视频信息
+message VodInfo {
+ // 视频清晰度
+ uint32 quality = 1;
+ // 视频格式
+ string format = 2;
+ // 视频时长
+ uint64 timelength = 3;
+ // 视频编码id
+ uint32 video_codecid = 4;
+ // 视频流
+ repeated Stream stream_list = 5;
+ // 伴音流
+ repeated DashItem dash_audio = 6;
+ // 杜比伴音流
+ DolbyItem dolby = 7;
+ // 响度均衡操作信息
+ VolumeInfo volume = 8;
+ // HIRES伴音流信息
+ LossLessItem loss_less_item = 9;
+}
+
+// 杜比伴音流信息
+message DolbyItem {
+ // 杜比类型
+ enum Type {
+ NONE = 0; // NONE
+ COMMON = 1; // 普通杜比音效
+ ATMOS = 2; // 全景杜比音效
+ }
+ // 杜比类型
+ Type type = 1;
+ // 音频流
+ DashItem audio = 2;
+}
+
+// HIRES伴音流信息
+message LossLessItem {
+ // 是否为hires
+ bool is_lossless_audio = 1;
+ // 音频流信息
+ DashItem audio = 2;
+ // 是否需要大会员
+ bool need_vip = 3;
+}
+
+// 响度均衡操作信息
+message VolumeInfo {
+ // Measured integrated loudness 实际综合响度
+ double measured_i = 1;
+ // Measured loudness range 实际响度范围
+ double measured_lra = 2;
+ // Measured true peak 实际响度真峰值
+ double measured_tp = 3;
+ // Measured threshold 实际响度阈值
+ double measured_threshold = 4;
+ // Target offset gain(Gain is applied before the true-peak limiter) 目标增益Offset(增益在真实峰值限制器之前应用)
+ double target_offset = 5;
+ // Target integrated loudness 目标综合响度
+ double target_i = 6;
+ // Target true peak 目标响度真峰值
+ double target_tp = 7;
+}
+
+//
+message PlayArc {
+ VideoType video_type = 1;
+ uint64 aid = 2;
+ uint64 cid = 3;
+ DrmTechType drm_tech_type = 4;
+}
+
+// 播放页信息-响应: PlayArcConf
+message PlayArcConf {
+ map arc_confs = 1;
+}
+
+// 高画质试看信息: 按钮
+message QnTrialButton {
+ string text = 1;
+ string link = 2;
+}
+
+// 播放页信息-响应: 高画质试看信息
+message QnTrialInfo {
+ // 能否试看高画质
+ bool trial_able = 1;
+ //
+ int32 remaining_times = 2;
+ //
+ int32 start = 3;
+ //
+ int32 time_length = 4;
+ //
+ QnTrialToast start_toast = 5;
+ //
+ QnTrialToast end_toast = 6;
+ //
+ QnTrialButton quality_open_tip_btn = 8;
+}
+
+// 高画质试看信息: Toast信息
+message QnTrialToast {
+ // toast文案 老字段
+ string text = 1;
+ // toast按钮
+ QnTrialButton button = 2;
+}
+
+// 事件
+message Event {
+ // 震动
+ Shake shake = 1;
+}
+
+// 震动
+message Shake {
+ //
+ string file = 1;
+}
diff --git a/grpc_api/bilibili/polymer/contract/v1/contract.proto b/grpc_api/bilibili/polymer/contract/contract.proto
similarity index 97%
rename from grpc_api/bilibili/polymer/contract/v1/contract.proto
rename to grpc_api/bilibili/polymer/contract/contract.proto
index 0b04e90..a6d4520 100644
--- a/grpc_api/bilibili/polymer/contract/v1/contract.proto
+++ b/grpc_api/bilibili/polymer/contract/contract.proto
@@ -1,6 +1,6 @@
syntax = "proto3";
-package bilibili.polymer.contract.v1;
+package bilibili.polymer.contract;
import "google/protobuf/empty.proto";
diff --git a/grpc_api/bilibili/relation/interfaces/api.proto b/grpc_api/bilibili/relation/interfaces/api.proto
new file mode 100644
index 0000000..0ffdd02
--- /dev/null
+++ b/grpc_api/bilibili/relation/interfaces/api.proto
@@ -0,0 +1 @@
+// TODO
\ No newline at end of file
diff --git a/grpc_api/bilibili/render/render.proto b/grpc_api/bilibili/render/render.proto
new file mode 100644
index 0000000..0ffdd02
--- /dev/null
+++ b/grpc_api/bilibili/render/render.proto
@@ -0,0 +1 @@
+// TODO
\ No newline at end of file
diff --git a/grpc_api/pgc/gaetway/vega/v1/vega.proto b/grpc_api/pgc/gateway/vega/v1/vega.proto
similarity index 100%
rename from grpc_api/pgc/gaetway/vega/v1/vega.proto
rename to grpc_api/pgc/gateway/vega/v1/vega.proto