用户动态接口解析 (#517)

* 添加:获取动态列表

* 补充:获取动态列表

* 枚举类型单独成文档

* 添加:获取动态详情

* 添加:获取用户空间动态
This commit is contained in:
7rikka 2023-06-21 23:30:53 +08:00 committed by GitHub
parent 24f35ac471
commit 37009a2894
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5417 additions and 0 deletions

3786
dynamic/all.md Normal file

File diff suppressed because it is too large Load Diff

269
dynamic/detail.md Normal file
View File

@ -0,0 +1,269 @@
# 获取动态详情
> https://api.bilibili.com/x/polymer/web-dynamic/v1/detail
请求方式:`GET`
是否需要登录:`否`
## URL参数
| 参数名 | 类型 | 必填 | 内容 | 备注 |
|-----------------|-----|-----|--------|-----|
| timezone_offset | num | | `-480` | |
| id | num | √ | 动态id | |
## Json回复
### 根对象
| 字段名 | 类型 | 内容 | 备注 |
|---------|-----|------|--------------------------|
| code | num | 响应码 | 0成功<br/>41011394101139 |
| message | str | | |
| ttl | num | 1 | |
| data | obj | 信息本体 | |
### `data`对象
| 字段名 | 类型 | 内容 | 备注 |
|------|-----|-----|-----|
| item | obj | | |
### `data`对象 -> `item`对象
参照 [获取动态列表](./all.md#获取动态列表)
## 请求示例
```shell
curl -L -X GET 'https://api.bilibili.com/x/polymer/web-dynamic/v1/detail?id=724328028268658744'
```
## 响应示例
<details>
<summary>点击查看</summary>
```json
{
"code": 0,
"message": "0",
"ttl": 1,
"data": {
"item": {
"basic": {
"comment_id_str": "724328028268658744",
"comment_type": 17,
"like_icon": {
"action_url": "",
"end_url": "",
"id": 0,
"start_url": ""
},
"rid_str": "724328032624443401"
},
"id_str": "724328028268658744",
"modules": {
"module_author": {
"face": "https://i2.hdslb.com/bfs/face/876bf5dfa8c583acb5f8689fc923077f6a2aba23.jpg",
"face_nft": false,
"following": null,
"jump_url": "//space.bilibili.com/11357018/dynamic",
"label": "",
"mid": 11357018,
"name": "动画魂-Anitama",
"official_verify": {
"desc": "",
"type": 0
},
"pendant": {
"expire": 0,
"image": "",
"image_enhance": "",
"image_enhance_frame": "",
"name": "",
"pid": 0
},
"pub_action": "",
"pub_location_text": "",
"pub_time": "2022-11-03 22:02",
"pub_ts": 1667484162,
"type": "AUTHOR_TYPE_NORMAL",
"vip": {
"avatar_subscript": 1,
"avatar_subscript_url": "",
"due_date": 1685808000000,
"label": {
"bg_color": "#FB7299",
"bg_style": 1,
"border_color": "",
"img_label_uri_hans": "",
"img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png",
"img_label_uri_hant": "",
"img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png",
"label_theme": "annual_vip",
"path": "",
"text": "年度大会员",
"text_color": "#FFFFFF",
"use_img_label": true
},
"nickname_color": "#FB7299",
"status": 1,
"theme_type": 0,
"type": 2
}
},
"module_dynamic": {
"additional": null,
"desc": {
"rich_text_nodes": [
{
"orig_text": "恭喜 @羽希plume @晕乎菌 中奖,已私信联系。——全天加码放水,红包力度很大,打开手淘搜“我爱你红包”,红包每天可以领,积少成多。 ——明天早上9点开另外一则抽奖有打扰请多保函。\n",
"text": "恭喜 @羽希plume @晕乎菌 中奖,已私信联系。——全天加码放水,红包力度很大,打开手淘搜“我爱你红包”,红包每天可以领,积少成多。 ——明天早上9点开另外一则抽奖有打扰请多保函。\n",
"type": "RICH_TEXT_NODE_TYPE_TEXT"
}
],
"text": "恭喜 @羽希plume @晕乎菌 中奖,已私信联系。——全天加码放水,红包力度很大,打开手淘搜“我爱你红包”,红包每天可以领,积少成多。 ——明天早上9点开另外一则抽奖有打扰请多保函。\n"
},
"major": null,
"topic": null
},
"module_more": {
"three_point_items": [
{
"label": "举报",
"type": "THREE_POINT_REPORT"
}
]
},
"module_stat": {
"comment": {
"count": 5,
"forbidden": false
},
"forward": {
"count": 1,
"forbidden": false
},
"like": {
"count": 170,
"forbidden": false,
"status": false
}
}
},
"orig": {
"basic": {
"comment_id_str": "",
"comment_type": 0,
"like_icon": {
"action_url": "",
"end_url": "",
"id": 0,
"start_url": ""
},
"rid_str": ""
},
"id_str": "720590749615259664",
"modules": {
"module_author": {
"face": "https://i2.hdslb.com/bfs/face/876bf5dfa8c583acb5f8689fc923077f6a2aba23.jpg",
"face_nft": false,
"following": null,
"jump_url": "//space.bilibili.com/11357018/dynamic",
"label": "",
"mid": 11357018,
"name": "动画魂-Anitama",
"official_verify": {
"desc": "",
"type": 0
},
"pendant": {
"expire": 0,
"image": "",
"image_enhance": "",
"image_enhance_frame": "",
"name": "",
"pid": 0
},
"pub_action": "",
"pub_time": "",
"pub_ts": 1666614008,
"type": "AUTHOR_TYPE_NORMAL",
"vip": {
"avatar_subscript": 1,
"avatar_subscript_url": "",
"due_date": 1685808000000,
"label": {
"bg_color": "#FB7299",
"bg_style": 1,
"border_color": "",
"img_label_uri_hans": "",
"img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png",
"img_label_uri_hant": "",
"img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png",
"label_theme": "annual_vip",
"path": "",
"text": "年度大会员",
"text_color": "#FFFFFF",
"use_img_label": true
},
"nickname_color": "#FB7299",
"status": 1,
"theme_type": 0,
"type": 2
}
},
"module_dynamic": {
"additional": null,
"desc": {
"rich_text_nodes": [
{
"orig_text": "双11天猫红包超大力度提前发放\n活动很猛红包很大加额加量\n打开手淘搜“我爱你红包”\n打开手淘搜“我爱你红包”\n打开手淘搜“我爱你红包”\n最高可领取28888元\n\n一天可领3次今天红包额度最大\n越早领取得现金概率越大\n抽奖=转发+关注",
"text": "双11天猫红包超大力度提前发放\n活动很猛红包很大加额加量\n打开手淘搜“我爱你红包”\n打开手淘搜“我爱你红包”\n打开手淘搜“我爱你红包”\n最高可领取28888元\n\n一天可领3次今天红包额度最大\n越早领取得现金概率越大\n抽奖=转发+关注",
"type": "RICH_TEXT_NODE_TYPE_TEXT"
},
{
"jump_url": "//search.bilibili.com/all?keyword=%23%E4%BA%92%E5%8A%A8%E6%8A%BD%E5%A5%96%23",
"orig_text": "#互动抽奖#",
"text": "#互动抽奖#",
"type": "RICH_TEXT_NODE_TYPE_TOPIC"
},
{
"orig_text": "\n转+评,留言你领到多少红包\n评论区随机抽取2位每人补贴50零花钱 ",
"text": "\n转+评,留言你领到多少红包\n评论区随机抽取2位每人补贴50零花钱 ",
"type": "RICH_TEXT_NODE_TYPE_TEXT"
}
],
"text": "双11天猫红包超大力度提前发放\n活动很猛红包很大加额加量\n打开手淘搜“我爱你红包”\n打开手淘搜“我爱你红包”\n打开手淘搜“我爱你红包”\n最高可领取28888元\n\n一天可领3次今天红包额度最大\n越早领取得现金概率越大\n抽奖=转发+关注#互动抽奖#\n转+评,留言你领到多少红包\n评论区随机抽取2位每人补贴50零花钱 "
},
"major": {
"draw": {
"id": 210334026,
"items": [
{
"height": 672,
"size": 134.85938,
"src": "https://i0.hdslb.com/bfs/new_dyn/37c21f8864e47cbeeb7c3e3a66bb250b11357018.jpg",
"tags": [],
"width": 576
}
]
},
"type": "MAJOR_TYPE_DRAW"
},
"topic": null
}
},
"type": "DYNAMIC_TYPE_DRAW",
"visible": true
},
"type": "DYNAMIC_TYPE_FORWARD",
"visible": true
}
}
}
```
</details>

220
dynamic/dynamic_enum.md Normal file
View File

@ -0,0 +1,220 @@
# 动态类型
| 类型 | 说明 | 示例 |
|-------------------------------|----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| DYNAMIC_TYPE_NONE | 无效动态 | [716510857084796964](https://t.bilibili.com/716510857084796964) |
| DYNAMIC_TYPE_FORWARD | 动态转发 | |
| DYNAMIC_TYPE_AV | 投稿视频 | |
| DYNAMIC_TYPE_PGC | 剧集(番剧、电影、纪录片) | |
| DYNAMIC_TYPE_COURSES | | |
| DYNAMIC_TYPE_WORD | 纯文字动态 | [718377531474968613](https://t.bilibili.com/718377531474968613) |
| DYNAMIC_TYPE_DRAW | 带图动态 | [718384798557536290](https://t.bilibili.com/718384798557536290) |
| DYNAMIC_TYPE_ARTICLE | 投稿专栏 | [718372214316990512](https://t.bilibili.com/718372214316990512) |
| DYNAMIC_TYPE_MUSIC | 音乐 | |
| DYNAMIC_TYPE_COMMON_SQUARE | 装扮<br/>剧集点评<br/>普通分享 | [551309621391003098](https://t.bilibili.com/551309621391003098)<br/>[716503778995470375](https://t.bilibili.com/716503778995470375)<br/>[716481612656672789](https://t.bilibili.com/716481612656672789) |
| DYNAMIC_TYPE_COMMON_VERTICAL | | |
| DYNAMIC_TYPE_LIVE | 直播间分享 | [216042859353895488](https://t.bilibili.com/216042859353895488) |
| DYNAMIC_TYPE_MEDIALIST | 收藏夹 | [534428265320147158](https://t.bilibili.com/534428265320147158) |
| DYNAMIC_TYPE_COURSES_SEASON | 课程 | [717906712866062340](https://t.bilibili.com/717906712866062340) |
| DYNAMIC_TYPE_COURSES_BATCH | | |
| DYNAMIC_TYPE_AD | | |
| DYNAMIC_TYPE_APPLET | | |
| DYNAMIC_TYPE_SUBSCRIPTION | | |
| DYNAMIC_TYPE_LIVE_RCMD | 直播开播 | [718371505648435205](https://t.bilibili.com/718371505648435205) |
| DYNAMIC_TYPE_BANNER | | |
| DYNAMIC_TYPE_UGC_SEASON | 合集更新 | [718390979031203873](https://t.bilibili.com/718390979031203873) |
| DYNAMIC_TYPE_SUBSCRIPTION_NEW | | |
# 富文本节点类型
| 类型 | 说明 | 示例 |
|---------------------------------|------|-----------------------------------------------------------------|
| RICH_TEXT_NODE_TYPE_NONE | | |
| RICH_TEXT_NODE_TYPE_TEXT | 文字节点 | [721295772787671059](https://t.bilibili.com/721295772787671059) |
| RICH_TEXT_NODE_TYPE_AT | @用户 | [721296515797090324](https://t.bilibili.com/721296515797090324) |
| RICH_TEXT_NODE_TYPE_LOTTERY | 互动抽奖 | [720907383182721040](https://t.bilibili.com/720907383182721040) |
| RICH_TEXT_NODE_TYPE_VOTE | 投票 | [721203899129659408](https://t.bilibili.com/721203899129659408) |
| RICH_TEXT_NODE_TYPE_TOPIC | 话题 | [721188862459641879](https://t.bilibili.com/721188862459641879) |
| RICH_TEXT_NODE_TYPE_GOODS | 商品链接 | [721282703208480790](https://t.bilibili.com/721282703208480790) |
| RICH_TEXT_NODE_TYPE_BV | 视频链接 | [716752002311258165](https://t.bilibili.com/716752002311258165) |
| RICH_TEXT_NODE_TYPE_AV | | |
| RICH_TEXT_NODE_TYPE_EMOJI | 表情 | [716751108968546393](https://t.bilibili.com/716751108968546393) |
| RICH_TEXT_NODE_TYPE_USER | | |
| RICH_TEXT_NODE_TYPE_CV | | |
| RICH_TEXT_NODE_TYPE_VC | | |
| RICH_TEXT_NODE_TYPE_WEB | 网页链接 | [716751027361022055](https://t.bilibili.com/716751027361022055) |
| RICH_TEXT_NODE_TYPE_TAOBAO | | |
| RICH_TEXT_NODE_TYPE_MAIL | 邮箱地址 | [721314095109767220](https://t.bilibili.com/721314095109767220) |
| RICH_TEXT_NODE_TYPE_OGV_SEASON | 剧集信息 | [721282046064853080](https://t.bilibili.com/721282046064853080) |
| RICH_TEXT_NODE_TYPE_OGV_EP | | |
| RICH_TEXT_NODE_TYPE_SEARCH_WORD | | |
# 作者类型
| 类型 | 说明 | 示例 |
|------------------------|------|-----|
| AUTHOR_TYPE_NONE | | |
| AUTHOR_TYPE_NORMAL | 普通更新 | |
| AUTHOR_TYPE_PGC | 剧集更新 | |
| AUTHOR_TYPE_UGC_SEASON | 合集更新 | |
| 类型 | 说明 | 示例 |
|-----------------|-----|-----|
| EMOJI_TYPE_NONE | | |
| EMOJI_TYPE_OLD | | |
| EMOJI_TYPE_NEW | | |
| EMOJI_TYPE_VIP | | |
# 相关内容卡片类型
| 类型 | 说明 | 示例 |
|-------------------------|------|--------------------------------------------------------------------------|
| ADDITIONAL_TYPE_NONE | | |
| ADDITIONAL_TYPE_PGC | | |
| ADDITIONAL_TYPE_GOODS | 商品信息 | |
| ADDITIONAL_TYPE_VOTE | 投票 | [716365292050055176](https://t.bilibili.com/716365292050055176) |
| ADDITIONAL_TYPE_COMMON | 一般类型 | 游戏<br/>[716357878942793745](https://t.bilibili.com/716357878942793745) |
| ADDITIONAL_TYPE_MATCH | | |
| ADDITIONAL_TYPE_UP_RCMD | | |
| ADDITIONAL_TYPE_UGC | 视频跳转 | [716489253410832401](https://t.bilibili.com/716489253410832401) |
| ADDITIONAL_TYPE_RESERVE | | 直播预约<br/>[716524987542929443](https://t.bilibili.com/716524987542929443) |
| 类型 | 说明 | 示例 |
|-------------------------------|-----|-----|
| ADDITIONAL_BUTTON_TYPE_NONE | | |
| ADDITIONAL_BUTTON_TYPE_JUMP | | |
| ADDITIONAL_BUTTON_TYPE_BUTTON | | |
| 类型 | 说明 | 示例 |
|----------------------------------|-----|-----|
| ADDITIONAL_BUTTON_STATUS_NONE | | |
| ADDITIONAL_BUTTON_STATUS_UNCHECK | | |
| ADDITIONAL_BUTTON_STATUS_CHECK | | |
| 类型 | 说明 | 示例 |
|-------------------------------|-----|-----|
| ADD_BUTTON_CLICK_TYPE_NONE | | |
| ADD_BUTTON_CLICK_TYPE_RESERVE | | |
| 类型 | 说明 | 示例 |
|-------------------------|-----|-----|
| DISABLE_STATE_HIGHLIGHT | | |
| DISABLE_STATE_GRAY | | |
| 类型 | 说明 | 示例 |
|----------------------------|-----|-----|
| ADD_BUTTON_BG_STYLE_FILL | | |
| ADD_BUTTON_BG_STYLE_STROKE | | |
| ADD_BUTTON_BG_STYLE_GRAY | | |
| 类型 | 说明 | 示例 |
|----------------------------------|-----|-----|
| HIGHLIGHT_TEXT_STYLE_TYPE_NONE | | |
| HIGHLIGHT_TEXT_STYLE_TYPE_ACTIVE | | |
# 动态主体类型
| 类型 | 说明 | 示例 |
|-----------------------------|-------|-----------------------------------------------------------------|
| MAJOR_TYPE_NONE | 动态失效 | [716510857084796964](https://t.bilibili.com/716510857084796964) |
| MAJOR_TYPE_ARCHIVE | 视频 | [716526237365829703](https://t.bilibili.com/716526237365829703) |
| MAJOR_TYPE_PGC | 剧集更新 | [645981661420322824](https://t.bilibili.com/645981661420322824) |
| MAJOR_TYPE_COURSES | | |
| MAJOR_TYPE_DRAW | 带图动态 | [716358050743582725](https://t.bilibili.com/716358050743582725) |
| MAJOR_TYPE_ARTICLE | | |
| MAJOR_TYPE_MUSIC | 音频更新 | |
| MAJOR_TYPE_COMMON | 一般类型 | [716481612656672789](https://t.bilibili.com/716481612656672789) |
| MAJOR_TYPE_LIVE | 直播间分享 | [267505569812738175](https://t.bilibili.com/267505569812738175) |
| MAJOR_TYPE_MEDIALIST | | |
| MAJOR_TYPE_APPLET | | |
| MAJOR_TYPE_SUBSCRIPTION | | |
| MAJOR_TYPE_LIVE_RCMD | 直播状态 | |
| MAJOR_TYPE_UGC_SEASON | 合计更新 | [716509100448415814](https://t.bilibili.com/716509100448415814) |
| MAJOR_TYPE_SUBSCRIPTION_NEW | | |
| 类型 | 说明 | 示例 |
|-----------------|-----|-----|
| MEDIA_TYPE_NONE | | |
| MEDIA_TYPE_UGC | | |
| MEDIA_TYPE_PGC | | |
| MEDIA_TYPE_LIVE | | |
| 类型 | 说明 | 示例 |
|--------------------------|-----|-----|
| PGC_SUB_TYPE_NONE | | |
| PGC_SUB_TYPE_BANGUMI | | |
| PGC_SUB_TYPE_MOVIE | | |
| PGC_SUB_TYPE_DOCUMENTARY | | |
| PGC_SUB_TYPE_DOMESTIC | | |
| PGC_SUB_TYPE_TV | | |
| 类型 | 说明 | 示例 |
|----------------------|-----|-----|
| DRAW_TAG_TYPE_NONE | | |
| DRAW_TAG_TYPE_COMMON | | |
| DRAW_TAG_TYPE_GOODS | | |
| DRAW_TAG_TYPE_USER | | |
| DRAW_TAG_TYPE_TOPIC | | |
| DRAW_TAG_TYPE_LBS | | |
| 类型 | 说明 | 示例 |
|----------------------------------|-----|-----|
| MAJOR_COMMON_STYLE_TYPE_NONE | | |
| MAJOR_COMMON_STYLE_TYPE_SQUARE | | |
| MAJOR_COMMON_STYLE_TYPE_VERTICAL | | |
| 类型 | 说明 | 示例 |
|---------------------|-----|-----|
| RESERVE_TYPE_NONE | | |
| RESERVE_TYPE_RECALL | | |
| 类型 | 说明 | 示例 |
|--------------------------|-----|-----|
| LIVE_STATE_TYPE_NONE | | |
| LIVE_STATE_TYPE_LIVE | | |
| LIVE_STATE_TYPE_ROTATION | | |
| 类型 | 说明 | 示例 |
|----------------------------------|-----|-----|
| SUBSCRIPTION_NEW_STYLE_TYPE_NONE | | |
| SUBSCRIPTION_NEW_STYLE_TYPE_DRAW | | |
| SUBSCRIPTION_NEW_STYLE_TYPE_LIVE | | |
| 类型 | 说明 | 示例 |
|------------------------------|---------|-----|
| THREE_POINT_DELETE | 删除 | |
| THREE_POINT_REPORT | 举报 | |
| THREE_POINT_FOLLOWING | 关注/取消关注 | |
| THREE_POINT_TOP | 置顶/取消置顶 | |
| THREE_POINT_UNFAV | | |
| THREE_POINT_UNSUBS | | |
| THREE_POINT_TOPIC_REPORT | | |
| THREE_POINT_TOPIC_IRRELEVANT | | |
| THREE_POINT_RCMD_RESOURCE | | |
| THREE_POINT_RCMD_FEEDBACK | | |
| 类型 | 说明 | 示例 |
|--------------------|-----|-----|
| FOLD_TYPE_NONE | | |
| FOLD_TYPE_PUBLISH | | |
| FOLD_TYPE_FREQUENT | | |
| FOLD_TYPE_UNITE | | |
| FOLD_TYPE_LIMIT | | |
| 类型 | 说明 | 示例 |
|------------------------------|-----|-----|
| DYN_STATUS_TYPE_NONE | | |
| DYN_STATUS_TYPE_NORMAL | | |
| DYN_STATUS_TYPE_AUDITING | | |
| DYN_STATUS_TYPE_SELF_VISIBLE | | |
| DYN_STATUS_TYPE_DELETED | | |
| 类型 | 说明 | 示例 |
|---------------|-----|-----|
| SCENE_DETAIL | | |
| SCENE_HOT | | |
| SCENE_GENERAL | | |
| SCENE_SPACE | | |
| SCENE_TOPIC | | |

1142
dynamic/space.md Normal file

File diff suppressed because it is too large Load Diff