feat & fix: update docs & fix typo in issue template

This commit is contained in:
晨叶梦春
2025-04-26 02:02:17 +08:00
parent c07d4a3d93
commit dc3f6d64a7
5 changed files with 264 additions and 136 deletions

View File

@@ -14,12 +14,13 @@ body:
attributes:
label: "API 来源"
description: "该 API 在何平台中使用"
multiple: true
options:
- "Web 端(含 h5"
- "PC 客户端Electron"
- "Android 客户端(含粉版、平板版、蓝版、概念版、国际版等)"
- "TV 客户端(含云听小电视、车机、物联网版等)"
- "IOS 客户端(含粉版、平板版、概念版等)"
- "TV 客户端(含云听小电视、车机、物联网版等)"
- "iOS 客户端(含粉版、平板版、概念版等)"
- "必剪客户端"
- "漫画客户端"
- "其他(请在详情中备注)"
@@ -33,16 +34,16 @@ body:
options:
- "REST"
- "gRPC"
- "长连接数据帧(含 ws、TCP"
- "长连接数据帧(含 WebSocket、TCP"
- "其他类型(请在详情中备注)"
validations:
required: true
- type: input
id: adderss
id: address
attributes:
label: "API 地址"
description: "REST 的 url或 gRPC 的包名+服务名,更新时可为原文档链接"
placeholder: "eg: https://api.bilibili.com/2333333"
placeholder: "e.g.: https://api.bilibili.com/x/..."
validations:
required: false
- type: textarea

View File

@@ -3,6 +3,7 @@
## 获取未读消息数
> https://api.bilibili.com/x/msgfeed/unread
> https://api.vc.bilibili.com/x/im/web/msgfeed/unread (新接口)
*请求方式GET*

View File

@@ -1348,7 +1348,7 @@ curl 'https://api.bilibili.com/x/relation/modify' \
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
| ---------- | ---- | ------------------------- | --------------- | ------------------------------------------------- |
| access_key | str | APP 登录 Token | APP 方式必要 | |
| fids | nums | 目标用户 mid 列表 | 必要 | 每个之间用`,`间隔 |
| fids | nums | 目标用户 mid 列表 | 必要 | 每个成员之间用 `,` 间隔,最多 50 个成员,不能包含自己的 mid |
| act | num | 操作代码 | 必要 | 同上<br />仅可为 1 或 5故只能进行批量关注和拉黑 |
| re_src | num | 关注来源代码 | 必要 | 同上 |
| csrf | str | CSRF Token位于 Cookie | Cookie 方式必要 | |
@@ -1485,13 +1485,15 @@ curl -G 'https://api.bilibili.com/x/relation' \
### 查询用户与自己关系(互相关系)
> https://api.bilibili.com/x/space/wbi/acc/relation
> 接口1https://api.bilibili.com/x/space/wbi/acc/relation
> 接口2https://api.bilibili.com/x/web-interface/relation
*请求方式GET*
认证方式CookieSESSDATA或 APP
鉴权方式:[Wbi 签名](../misc/sign/wbi.md)
鉴权方式仅接口1[Wbi 签名](../misc/sign/wbi.md)
~~该接口的旧版 API https://api.bilibili.com/x/space/acc/relation~~(已废弃,不建议使用)
@@ -1501,8 +1503,8 @@ curl -G 'https://api.bilibili.com/x/relation' \
| ---------- | ---- | ------------ | ----------- | ------------------------------------ |
| access_key | str | APP登录Token | APP方式必要 | |
| mid | num | 目标用户mid | 必要 | |
| w_rid | str | Wbi 签名 | 必要 | 详见 [Wbi 签名](../misc/sign/wbi.md) |
| wts | num | 当前时间戳 | 必要 | 详见 [Wbi 签名](../misc/sign/wbi.md) |
| w_rid | str | Wbi 签名 | 仅接口1必要 | 详见 [Wbi 签名](../misc/sign/wbi.md) |
| wts | num | 当前时间戳 | 仅接口1必要 | 详见 [Wbi 签名](../misc/sign/wbi.md) |
**json回复**

View File

@@ -676,7 +676,7 @@ https://i1.hdslb.com/bfs/archive/ea0dd34bf41e23a68175680a00e3358cd249105f.jpg
`data`中的`Tags`数组:
基本同「[获取视频TAG信息](tags.md#获取视频TAG信息)」中的data数组
基本同「[获取视频TAG信息(新)](tags.md#获取视频TAG信息)」中的data数组
`data`中的`Reply`对象:

View File

@@ -1,8 +1,132 @@
# 视频TAG
## 获取视频TAG信息
## 获取视频TAG信息(新)
> https://api.bilibili.com/x/tag/archive/tags
> <https://api.bilibili.com/x/web-interface/view/detail/tag>
*请求方式GET*
认证方式CookieSESSDATA
**url参数**
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
| ------ | ---- | -------- | ------------ | -------------------------------- |
| aid | num | 稿件avid | 必要(可选) | avid与bvid任选一个 |
| bvid | str | 稿件bvid | 必要(可选) | avid与bvid任选一个 |
| cid | num | 分P cid | 非必要 | 提供此参数可返回对应分P的BGM信息 |
**json回复**
根对象:
| 字段 | 类型 | 内容 | 备注 |
| ------- | ----- | -------- | --------------------------- |
| code | num | 返回值 | 0成功<br />-400请求错误 |
| message | str | 错误信息 | 默认为0 |
| ttl | num | 1 | |
| data | array | TAG列表 | 无TAG为空 |
`data`数组:
| 项 | 类型 | 内容 | 备注 |
| ---- | ---- | -------------- | ---- |
| 0 | obj | 第1个TAG | |
| n | obj | 第n+1个TAG | |
| …… | obj | …… | …… |
`data`数组中的对象:
| 字段 | 类型 | 内容 | 备注 |
| -------- | ---- | ---------- | ------------------------------------------------------------ |
| tag_id | num | tag_id | 当`tag_type`不为`bgm`时有效 |
| tag_name | str | TAG名称 | |
| music_id | str | 背景音乐id | 当`tag_type``bgm`时有效,以`MA`开头 |
| tag_type | str | TAG类型 | `old_channel`:普通标签<br />`topic`:话题<br />`bgm`:背景音乐 |
| jump_url | str | 跳转url | 当`tag_type``topic``bgm`时有效 |
**示例:**
查询视频`av89772773`/`BV1M741177Kg`的TAG
avid方式
```shell
curl -G 'https://api.bilibili.com/x/web-interface/view/detail/tag' \
--data-urlencode 'aid=89772773' \
--data-urlencode 'cid=153322313' \
-b 'SESSDATA=xxx'
```
bvid方式
```shell
curl -G 'https://api.bilibili.com/x/web-interface/view/detail/tag' \
--data-urlencode 'bvid=BV1M741177Kg' \
--data-urlencode 'cid=153322313' \
-b 'SESSDATA=xxx'
```
<details>
<summary>查看响应示例:</summary>
```json
{
"code": 0,
"message": "0",
"ttl": 1,
"data": [
{
"tag_id": 0,
"tag_name": "发现《Other Side》",
"music_id": "MA456128506519140428",
"tag_type": "bgm",
"jump_url": "https://music.bilibili.com/h5/music-detail?music_id=MA456128506519140428&cid=153322313&aid=89772773&na_close_hide=1"
},
{
"tag_id": 12620189,
"tag_name": "异度侵入",
"music_id": "",
"tag_type": "old_channel",
"jump_url": ""
},
{
"tag_id": 707,
"tag_name": "ED",
"music_id": "",
"tag_type": "old_channel",
"jump_url": ""
},
{
"tag_id": 1394,
"tag_name": "动漫",
"music_id": "",
"tag_type": "old_channel",
"jump_url": ""
},
{
"tag_id": 13289329,
"tag_name": "异度侵入ed原图",
"music_id": "",
"tag_type": "old_channel",
"jump_url": ""
},
{
"tag_id": 7520816,
"tag_name": "bilibili新星计划",
"music_id": "",
"tag_type": "old_channel",
"jump_url": ""
}
]
}
```
</details>
## 获取视频TAG信息
> <https://api.bilibili.com/x/tag/archive/tags>
*请求方式GET*
@@ -20,7 +144,7 @@
根对象:
| 字段 | 类型 | 内容 | 备注 |
| ------- | ------ | -------- | ---------------------------- |
| ------- | ----- | -------- | --------------------------- |
| code | num | 返回值 | 0成功<br />-400请求错误 |
| message | str | 错误信息 | 默认为0 |
| ttl | num | 1 | |
@@ -46,7 +170,7 @@
| short_content | str | TAG简介 | |
| type | num | | |
| state | num | 0 | |
| ctime | num | 创建时间 | 时间戳 |
| ctime | num | 创建时间 | 秒级时间戳 |
| count | obj | 状态数 | |
| is_atten | num | 是否关注 | 0未关注<br />1已关注<br />需要登录(Cookie) <br />未登录为0 |
| likes | num | 0 | 作用尚不明确 |
@@ -205,7 +329,7 @@ curl -G 'https://api.bilibili.com/x/tag/archive/tags' \
## 点赞&取消点赞视频TAG
> https://api.bilibili.com/x/tag/archive/like2
> <https://api.bilibili.com/x/tag/archive/like2>
*请求方式POST*
@@ -258,13 +382,13 @@ curl 'https://api.bilibili.com/x/tag/archive/like2' \
## 点踩&取消点踩视频TAG
> https://api.bilibili.com/x/tag/archive/hate2
> <https://api.bilibili.com/x/tag/archive/hate2>
*请求方式POST*
认证方式CookieSESSDATA
重复访问为取消
重复请求为取消
**正文参数( application/x-www-form-urlencoded **