-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Labels
新增/Add添加或修改新的内容添加或修改新的内容
Description
提交前请确认
- 我已阅读贡献指南, 已检索仓库中文档,确认不包含所提及内容,且 Issues、Pull Requests 中无相关提交
API 来源
Web 端(含 H5)
API 类型
REST
API 地址
https://api.bilibili.com/x/polymer/web-dynamic/v1/forward/preview
详情描述
这个接口会比 图文详细信息 精简一点
请求方式:GET
认证方式:Cookie(SESSDATA)
正文参数( application/x-www-form-urlencoded ):
参数名 | 类型 | 内容 | 必要性 | 备注 |
---|---|---|---|---|
id | string | 图文 id | 必要 | 非专栏的 cvid |
json回复:
根对象:
我懒得写表格了,贴个ts定义吧
nodes
的元素结构与 富文本节点 一致,Array<any>
只是占位
export interface Response {
code: number;
message: string;
ttl: number;
data: {
item: {
id: string;
type: number;
user: {
mid: number;
name: string;
}
common_card: {
cover: string;
nodes: Array<any>
}
}
}
}
示例:
curl 'https://api.bilibili.com/x/polymer/web-dynamic/v1/forward/preview' \
--data-urlencode 'id=20105742642030106' \
-b 'SESSDATA=xxx'
查看响应示例:
{
"code": 0,
"message": "0",
"ttl": 1,
"data": {
"item": {
"common_card": {
"cover": "https://i0.hdslb.com/bfs/article/0a72422ce8e77d8512f010d93b1b7f9bc4e64e52.jpg",
"nodes": [
{
"orig_text": "专栏行为准则 ",
"text": "专栏行为准则 ",
"type": "RICH_TEXT_NODE_TYPE_TEXT"
}
]
},
"id": "20105742642030106",
"type": 1,
"user": {
"mid": 144900660,
"name": "专栏小天使"
}
}
}
}
Metadata
Metadata
Assignees
Labels
新增/Add添加或修改新的内容添加或修改新的内容