feat: 各种接口补充与错误修正 (#1066)

* fix(video/collection.md): unclosed xml tags

* feat(video/report.md): uuid not really random

* feat: b23.tv short link

* feat: login/moral/exp log

* feat: v_voucher

* feat: upload video cover & post

* feat(creativecenter/upload.md): upload octet-stream

* feat(creativecenter/upload.md): update some notes

* feat(clientinfo/ip.md): another from live

* feat: live web heartbeat

* feat: update popular series & precious

* fix(creativecenter/upload.md): mistakes in example

* feat: merge duplicate fav info

* feat(README.md): missing link to webmask

* feat(search/hot.md): word_type

* feat(login/login_action): recovery old api

* feat(video/collection.md):  series operation

* feat: video season operation

* feat: add & mod some links

* feat(search/suggest.md): up to date

* feat: web home header image

* feat(misc/sign/bili_ticket.md): demo for nodejs

* feat(creativecenter/upload.md): x-upos-auth validity period

* feat: add referer & buvid3 to request header

* feat: customer service message heartbeat & upload

* feat(customerservice/msg.md): upload code 1200201

* feat(video/report.md): click/web/h5

* feat(video/report.md): view count desc

* feat: laser2

* feat: wbi_key in bili_ticket

* fix: typo & unclosed XML tags

* feat(misc/sign/v_voucher): cookie x-bili-gaia-vtoken

* feat(search/hot.md): square

* feat(video/status_number.md): fold archive_stat/stat

* feat(fav/info.md): resource/infos invalid type 21

* feat: /x/activity/subject/info

* feat: lottery

* feat(docs/misc/b23.tv): remove some unnecessary fields

* feat(creativecenter/upload.md): types/predict

* fix(video/collection.md): invalid end tag

* feat: app version upgrade

* feat(creativecenter/upload.md): tag/recommend #528

* feat(user/status_number.md): navnum

* feat: /x/activity/page/list

* feat(comment/list.md): desc about pagination_str

* feat(comment/list.md): update example

* feat(dynamic/all.md): #1082

* fix(comment/list.md): -352 not -412

* feat: #700

* feat(video/video_stream.md): #606 & cv949156

* feat(message/private_msg.md): single_unread freq

* feat: getUserWallet

* fix: broken form

* feat(Layout.vue): copyright to 2024

* feat: /x/topic/pub/rcmd/search

* feat: #425

* feat(misc/time_stamp.md): rtc/getTimestamp

* fix(misc/time_stamp.md): missing end tag

* feat: #745

* feat(dynamic/all.md): update feed/all

* feat(danmaku/action.md): #220

* feat(live/info.md): gethistory from cv8186413

* fix(danmaku/action.md): missing end tag
This commit is contained in:
Session小胡
2024-08-21 19:02:39 +08:00
committed by GitHub
parent f7599fb693
commit 60a0c5d1a2
46 changed files with 18489 additions and 8207 deletions

View File

@@ -2,7 +2,7 @@
## 发送视频弹幕
> https://api.bilibili.com/x/v2/dm/post
> https://api.bilibili.com/x/v2/dm/post
*请求方式POST*
@@ -12,6 +12,15 @@
`mode=6`的逆向弹幕与`mode=8`的代码弹幕不可发送
**URL参数:**
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
| --- | --- | --- | --- | --- |
| web_location | str | 普通视频: 1315873 | 不必要 | |
| csrf | str | CSRF Token (即 Cookie 中 bili_jct) | Cookie 方式必要 | |
| w_rid | str | Wbi 签名 | 必要 | 参见 [Wbi 签名](../misc/sign/wbi.md) |
| wts | str | UNIX 秒级时间戳 | 必要 | 参见 [Wbi 签名](../misc/sign/wbi.md) |
**正文参数( application/x-www-form-urlencoded **
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
@@ -320,6 +329,84 @@ curl 'https://api.bilibili.com/x/v2/dm/command/post' \
</details>
## 发送打分弹幕
> https://api.bilibili.com/x/v2/dm/command/grade/post
*请求方式: POST*
认证方式: Cookie (SESSDATA)
<!--{
"gh": [220]
}-->
**正文参数 (application/x-www-form-urlencoded):**
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
| ------ | ---- | ---- | ------ | ---- |
| aid | num | 稿件 aid | 必要 | |
| cid | num | 分 P cid | 必要 | |
| progress | num | 播放进度 | 必要 | 单位为毫秒 |
| grade_id | num | 打分 id | 必要 | |
| grade_score | num | 分数 | 偶数, 最大 10 |
| polaris_app_id | num | 100 | 不必要 |
| polaris_platfrom | num | 5 | 不必要 | |
| spmid | str | 333.788.0.0 | 不必要 | |
| from_spmid | str | 来源 spmid | 不必要 | |
| csrf | str | CSRF Token (即 Cookie 中的 bili_jct) | 必要 | |
**JSON回复:**
根对象:
| 字段 | 类型 | 内容 | 备注 |
| ---- | ---- | ---- | ---- |
| code | num | 返回值 | 0: 成功 |
| message | str | 错误信息 | 默认为 0 |
| ttl | num | 1 | |
| data | obj | 信息本体 | |
`data`对象:
| 字段 | 类型 | 内容 | 备注 |
| ---- | ---- |
| dmid | num | 弹幕dmid | |
| dmid_str | str | 弹幕dmid | 字串形式 |
| visible | bool | 是否可见 | |
| action | str | 动作 | `"grade:"` + (请求的分数 / 2) |
**示例:**
```shell
curl -X POST 'https://api.bilibili.com/x/v2/dm/command/grade/post' \
--data-urlencode 'aid=112861976201494' \
--data-urlencode 'cid=500001629877726' \
--data-urlencode 'progress=32000' \
--data-urlencode 'grade_id=3651137' \
--data-urlencode 'grade_score=10' \
--data-urlencode 'csrf=xxx' \
-b 'SESSDATA=xxx'
```
<details>
<summary>查看响应示例:</summary>
```json
{
"code": 0,
"message": "0",
"ttl": 1,
"data": {
"dmid": 1651556419721443584,
"dmidStr": "1651556419721443584",
"visible": true,
"action": "grade:5"
}
}
```
</details>
## 撤回弹幕