bilibili-API-collect/dynamic/action.md
zjkwdy f08e578791
一些动态有关的api (#596)
* 格式化一下

* 创建投票api

* 新版动态发送

* 纠错

* 纠错

* 纠错

* 纠错

* 删除定时动态

* 删除定时动态

* 查看草稿箱列表

* 立即发布定时动态
2023-01-26 17:15:41 +08:00

110 lines
2.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 动态操作
- [删除动态](#删除动态)
- [删除定时发送动态](#删除草稿)
## 删除动态
> https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/rm_dynamic
*请求方式POST*
认证方式CookieSESSDATA
**正文参数multipart/form-data**
| 参数名 | 类型 | 内容 |
| ---------- | ---- | ------ |
| dynamic_id | num | 动态id |
| csrf_token | str | csrf |
**json回复**
根对象:
| 字段 | 类型 | 内容 |
| ------- | ---- | ----------------- |
| code | num | 0:成功 |
| | | 500404:已经删除过 |
| | | 500406:不是自己的 |
| msg | str | 错误信息 |
| message | str | 和msg一样 |
| data | obj | 未知 |
<details>
<summary>查看示例</summary>
```bash
curl 'https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/rm_dynamic' \
-X POST \
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:93.0) Gecko/20100101 Firefox/93.0' \
-H 'Referer: https://t.bilibili.com/' \
-H 'Cookie: SESSDATA=********; bili_jct=de2731532b4ab96bc8536da948932668;' \
--data-raw 'dynamic_id=588320531406678918&csrf_token=de2731532b4ab96bc8536da948932668&csrf=de2731532b4ab96bc8536da948932668'
```
```json
{
"code":0,
"msg":"",
"message":"",
"data": {
"_gt_":0
}
}
```
</details>
## 删除草稿
> https://api.vc.bilibili.com/dynamic_draft/v1/dynamic_draft/rm_draft
*请求方式POST*
认证方式CookieSESSDATA
**正文参数application/x-www-form-urlencoded**
| 参数名 | 类型 | 内容 |
| ---------- | ---- | -------------- |
| draft_id | num | 定时发送草稿id |
| csrf_token | str | csrf |
**json回复**
根对象:
| 字段 | 类型 | 内容 |
| ------- | ---- | ---------------------------- |
| code | num | 0:成功<br/>4120015: 系统异常 |
| message | str | 错误信息 |
| ttl | num | 1 |
| data | obj | 空对象 |
<details>
<summary>查看示例</summary>
```bash
curl -X POST 'https://api.vc.bilibili.com/dynamic_draft/v1/dynamic_draft/rm_draft' \
--data-urlencode 'draft_id=755409289278914611' \
--data-urlencode 'csrf=xxxx'
-b 'SESSDATA=xxxx;' \
```
```json
{
"code": 0,
"message": "0",
"ttl": 1,
"data": {}
}
```
</details>