From 9aa1a8165bca7a94306ce0d0108379be7f2eb9dd Mon Sep 17 00:00:00 2001 From: SessionHu <102411014+SessionHu@users.noreply.github.com> Date: Tue, 12 Aug 2025 17:55:01 +0800 Subject: [PATCH] feat(dynamic/detail.md): add forward dynamic detail close #1356 --- docs/dynamic/detail.md | 220 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 220 insertions(+) diff --git a/docs/dynamic/detail.md b/docs/dynamic/detail.md index 145e7b6..2018cea 100644 --- a/docs/dynamic/detail.md +++ b/docs/dynamic/detail.md @@ -2105,3 +2105,223 @@ curl 'https://api.bilibili.com/x/polymer/web-dynamic/v1/detail/forward' \ + +## 获取转发动态信息 + +> https://api.bilibili.com/x/polymer/web-dynamic/v1/detail/forward/item + +*请求方法: GET* + +认证方式: Cookie (SESSDATA) + +**URL 参数:** + +| 字段 | 类型 | 内容 | 必要性 | 备注 | +| ---- | ------ | ------ | ---- | ---- | +| id | number | 动态 id | 必要 | | +| timezone_offset | number | 时区偏移 | 非必要 | `(new Date).getTimezoneOffset()` | + +**JSON 回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ---- | ---- | ---- | ---- | +| code | number | 返回值 | 0: 成功
500: 加载错误,请稍后再试
4101105: 请求数据发生错误, 请刷新或稍后重试 | +| data | object | 数据本体 | | +| message | string | 错误信息 | 成功时为 `0` | +| ttl | number | `1` | | + +`data` 对象: + +| 字段 | 类型 | 内容 | 备注 | +| ---- | ---- | ---- | ---- | +| item | object | 动态信息 | 套了个娃 | + +`data.item` 对象: + +| 字段 | 类型 | 内容 | 备注 | +| ---- | ---- | ---- | ---- | +| desc | object | 动态内容 | | +| id_str | string | 动态 id 字符串 | | +| pub_time | string | 发布时间 | | +| user | object | 发布用户信息 | | + +`data.item.desc` 对象: + +| 字段 | 类型 | 内容 | 备注 | +| ---- | ---- | ---- | ---- | +| rich_text_nodes | object[] | 富文本节点 | 参见 [富文本节点](../opus/rich_text_node.md) | +| text | string | 纯文本内容 | | + +`data.item.user` 对象: + +| 字段 | 类型 | 内容 | 备注 | +| ---- | ---- | ---- | ---- | +| face | string | 头像 URL | | +| face_nft | boolean | | | +| mid | number | 用户 mid (UID) | | +| name | string | 用户名 | | +| official | object | 认证信息 | | +| pendant | object | 装扮信息 | | +| vip | object | 大会员信息 | | + +`data.item.user.official` 对象: + +| 字段 | 类型 | 内容 | 备注 | +| ---- | ---- | ---- | ---- | +| desc | string | | | +| role | number | | | +| title | string | | | +| type | number | | | + +`data.item.user.pendant` 对象: + +| 字段 | 类型 | 内容 | 备注 | +| ---- | ---- | ---- | ---- | +| expire | number | | | +| image | string | | | +| image_enhance | string | | | +| image_enhance_frame | string | | | +| n_pid | number | | | +| name | string | | | +| pid | number | | | + +`data.item.user.vip` 对象: + +| 字段 | 类型 | 内容 | 备注 | +| ---- | ---- | ---- | ---- | +| avatar_icon | object | | | +| avatar_subscript | number | | | +| avatar_subscript_url | string | | | +| due_date | number | | | +| label | object | | | +| nickname_color | string | | | +| role | number | | | +| status | number | | | +| theme_type | number | | | +| tv_due_date | number | | | +| tv_vip_pay_type | number | | | +| tv_vip_status | number | | | +| type | number | | | +| vip_pay_type | number | | | + +`data.item.user.vip.avatar_icon` 对象: + +| 字段 | 类型 | 内容 | 备注 | +| ---- | ---- | ---- | ---- | +| icon_resource | object | | | +| icon_type | number | | | + +`data.item.user.vip.avatar_icon.icon_resource` 对象: + +| 字段 | 类型 | 内容 | 备注 | +| ---- | ---- | ---- | ---- | + +`data.item.user.vip.label` 对象: + +| 字段 | 类型 | 内容 | 备注 | +| ---- | ---- | ---- | ---- | +| bg_color | string | | | +| bg_style | number | | | +| border_color | string | | | +| img_label_uri_hans | string | | | +| img_label_uri_hans_static | string | | | +| img_label_uri_hant | string | | | +| img_label_uri_hant_static | string | | | +| label_theme | string | | | +| path | string | | | +| text | string | | | +| text_color | string | | | +| use_img_label | boolean | | | + +**示例:** + +```shell +curl -G 'https://api.bilibili.com/x/polymer/web-dynamic/v1/detail/forward/item' \ +--url-query 'id=1100082020923473952' \ +-b 'SESSDATA=xxx' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "data": { + "item": { + "desc": { + "rich_text_nodes": [ + { + "orig_text": "分享视频", + "text": "分享视频", + "type": "RICH_TEXT_NODE_TYPE_TEXT" + } + ], + "text": "分享视频" + }, + "id_str": "1074491510557245446", + "pub_time": "06月04日", + "user": { + "face": "https://i0.hdslb.com/bfs/face/aebb2639a0d47f2ce1fec0631f412eaf53d4a0be.jpg", + "face_nft": false, + "mid": 293793435, + "name": "社会易姐QwQ", + "official": { + "desc": "", + "role": 0, + "title": "", + "type": -1 + }, + "pendant": { + "expire": 0, + "image": "https://i0.hdslb.com/bfs/garb/item/4f8f3f1f2d47f0dad84f66aa57acd4409ea46361.png", + "image_enhance": "https://i0.hdslb.com/bfs/garb/item/fe0b83b53e2342b16646f6e7a9370d8a867decdb.webp", + "image_enhance_frame": "https://i0.hdslb.com/bfs/garb/item/127c507ec8448be30cf5f79500ecc6ef2fd32f2c.png", + "n_pid": 2511, + "name": "初音未来13周年", + "pid": 2511 + }, + "vip": { + "avatar_icon": { + "icon_resource": {}, + "icon_type": 1 + }, + "avatar_subscript": 1, + "avatar_subscript_url": "", + "due_date": 1770825600000, + "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": "http://i0.hdslb.com/bfs/vip/label_annual.png", + "text": "年度大会员", + "text_color": "#FFFFFF", + "use_img_label": true + }, + "nickname_color": "#FB7299", + "role": 3, + "status": 1, + "theme_type": 0, + "tv_due_date": 1640793600, + "tv_vip_pay_type": 0, + "tv_vip_status": 0, + "type": 2, + "vip_pay_type": 0 + } + } + } + }, + "message": "0", + "ttl": 1 +} +``` +
+ +