mirror of
https://github.com/SocialSisterYi/bilibili-API-collect.git
synced 2025-03-13 18:00:11 +08:00
* fix(search/search_request.md): cookie buvid3 * feat(login/login_action/password.md): more sms desc * fix: typo * feat(live/info.md): add ps for getRoomBaseInfo * fix(danmaku/action.md): broken form * chore: Browserslist: caniuse-lite is outdated * feat(comment/list.md): reply/wbi/main param next * feat(misc/buvid3_4.md): get buvid3 only * fix: broken links & wrong code type * feat: close all img & br tags * feat(login/cookie_refresh.md): missing demo links * feat(dynamic/detail.md): /lottery_svr/v1/lottery_svr/lottery_notice * fix(video/action.md): share cookie buvid3 * feat: deprecated stat & attribute * feat(dynamic/detail.md): reaction * feat(misc/sign/v_voucher.md): header * feat(dynamic/detail.md): update detail params & example * feat(APP_widget/ver.md): /x/v2/version * feat(video/info.md): update view * feat(docs/user.md): remove channel * feat(search/search_request.md): search/type -1200 * feat(user/space.md): audio * feat(video/player.md): /x/player/wbi/v2 * feat(audio/musicstream_url.md): update web/url * feat(comment/readme.md): state * fix(user/medal.md): wrong guard_level desc * feat(live/message_stream.md): DANMU_MSG * fix(user/medals): wrong guard_level & guard_icon desc * feat(live/message_stream.md): format & add more 'cmd' * feat(live/message_stream.md): add more 'cmd' * feat(live/message_stream.md): add tips for non-login users * feat(video/player.md): need_login_subtitle --------- Co-authored-by: 社会易姐QwQ <45892418+SocialSisterYi@users.noreply.github.com>
5.3 KiB
5.3 KiB
获取最新 APP 版本
获取版本信息
请求方法: GET
URL参数:
参数名 | 类型 | 内容 | 必要性 | 备注 |
---|---|---|---|---|
mobi_app | str | 目标客户端类型 | 不必要 | 留空为最新有更新的平台 android: Android 版 iphone: iPhone 版 ipad: iPad HD 版 win: UWP 版 android_tv_yst: TV 版 android_car: 车机版 pc_client: PC 客户端 |
JSON回复:
字段 | 类型 | 内容 | 备注 |
---|---|---|---|
code | int | 返回值 | 0: 成功 |
message | str | 错误信息 | 默认为 0 |
ttl | int | 1 | |
data | array | 版本信息列表 |
data
数组中的对象:
字段 | 类型 | 内容 | 备注 |
---|---|---|---|
plat | int | 平台 | 0: Android 1: iPhone 2: iPad HD 3: UWP 12: TV 版 35: 车机版 40: PC 客户端 |
desc | str | 版本描述 | |
version | str | 版本号 | |
build | int | 内部版本号 |
示例:
curl -G 'https://app.bilibili.com/x/v2/version' \
--url-query'mobi_app=android'
查看响应示例:
{
"code": 0,
"message": "0",
"ttl": 1,
"data": [
{
"plat": 0,
"desc": "-修复了一些bug,切了个大西瓜~",
"version": "8.9.0",
"build": 8090300,
"ptime": 1723612377
},
// ...
{
"plat": 0,
"desc": "[修正]横屏状态下,视频列表加载失败的问题\n[修正]超过48kHz采样率的音频无法播放的问题\n[修正]部分系统黑屏的问题\nPS:帮下面的同学祈祷早日上架",
"version": "2.0.4",
"build": 0,
"ptime": 1382630400
}
]
}
版本升级
请求方式: GET
鉴权方式(非必须):APP API 签名与鉴权
URL参数:
参数名 | 类型 | 内容 | 必要性 | 备注 |
---|---|---|---|---|
abi | str | 设备 CPU ABI | 不必要 | 如 arm64-v8a |
appid | str | 客户端类型 | 不必要 | 如 tv.danmaku.bili |
brand | str | 设备品牌 | 不必要 | 如 google |
build | int | 当前 APP 版本号 | 必要 | 如 8000200 |
channel | str | APP 分发渠道 | 必要 | 如 master |
deviceid | str | 设备唯一 ID | 不必要 | 即 XU-Prefixed BUVID,见 device_identity |
env | str | APP 分发环境 | 不必要 | 默认 prod |
iv | int | 当前 APP innerVer | 不必要 | 如 8000210 |
mobi_app | str | APP mobi_app | 必要 | 如 android |
model | str | 设备型号 | 不必要 | 如 Pixel 2 XL |
nt | str | - | 必要 | 默认 1 |
ov | str | 设备 OS 版本 | 必要 | 安卓即 API Level,如 Android 11 为 30 |
platform | str | 设备平台 | 不必要 | 如 android |
screen | str | 设备屏幕参数 | 不必要 | 如 2712_1440@537.882_537.882 |
sn | int | 当前 APP SN | 必要 | 如 15088473 |
vn | str | 当前 APP 版本名称 | 必要 | 如 8.0.0 |
标头参数(Headers):
参数名 | 类型 | 内容 | 必要性 | 备注 |
---|---|---|---|---|
app-key | str | APPKey 名称 | 必要 | 大体等同于 mobi_app 。特别地:64 位版本粉版客户端应为 android64 |
buvid | str | BUVID | 必要 | XU-Prefixed BUVID,见 device_identity |
JSON回复:
根对象:
字段 | 类型 | 内容 | 备注 |
---|---|---|---|
code | int | 返回值 | 0: 成功 -304: 木有改动 -400: 请求异常 |
message | str | 错误信息 | 默认为 0 |
ttl | int | 1 | |
data | obj | 信息本体 |
data
对象:
字段 | 类型 | 内容 | 备注 |
---|---|---|---|
title | str | 标题 | |
content | str | 内容 | |
version | str | 最新版本名称 | |
version_code | int | 最新版本号 | 即 build |
url | str | 下载地址 | |
size | int | 大小 | 单位字节 |
md5 | str | MD5 值 | |
silent | int | 是否静默安装? | |
upgrade_type | int | 升级类型? | |
cycle | int | 升级周期? | |
policy | int | 升级策略? | |
policy_url | str | 升级策略链接? | |
ptime | int | 发布时间 |
示例:
curl -G 'https://app.bilibili.com/x/v2/version/fawkes/upgrade' \
--url-query 'build=1145141' \
--url-query 'channel=apt' \
--url-query 'mobi_app=android' \
--url-query 'nt=awa' \
--url-query 'ov=qwq' \
--url-query 'platform=archlinux' \
--url-query 'sn=919810' \
--url-query 'vn=!!!'
查看响应示例:
{
"code": 0,
"message": "0",
"ttl": 1,
"data": {
"title": "升级提醒",
"content": "-修复了一些bug,并吃了一桶冰淇凌~\n-记得检查暑假作业哦!",
"version": "8.10.0",
"version_code": 8100300,
"url": "https://dl.hdslb.com/mobile/pack/android64/15793300/iBiliPlayer-apinkRelease-8.10.0-b15793300.apk",
"size": 132432843,
"md5": "f196c0ea68ff894dab0cf380cafad802",
"silent": 0,
"upgrade_type": 1,
"cycle": 4,
"policy": 0,
"policy_url": "",
"is_gray": 0,
"ptime": 1724207041
}
}