From 8c6bb6be92e88f285b73f0d0b3f4f5831196c062 Mon Sep 17 00:00:00 2001 From: SessionHu <102411014+SessionHu@users.noreply.github.com> Date: Thu, 1 May 2025 08:45:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8A=A8=E6=80=81=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E5=85=AC=E5=91=8A=E6=A0=8F=20(=E6=97=A7=E7=89=88)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit close #1254 --- README.md | 2 +- docs/dynamic/banner.md | 51 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 023546a..70f3ccb 100644 --- a/README.md +++ b/README.md @@ -176,7 +176,7 @@ B站 API 采用 C/S 结构,大多数接口为 REST API 和 gRPC,少部分接 - [x] [特定话题动态列表](docs/dynamic/tag_dynamics.md) - [ ] [动态内容](docs/dynamic/get_dynamic_detail.md) - [ ] [导航栏动态](docs/dynamic/nav.md) - - [ ] [首页公告栏](docs/dynamic/banner.md) + - [x] [首页公告栏](docs/dynamic/banner.md) - [ ] [创作中心](docs/creativecenter) - [ ] [投稿](docs/creativecenter/upload.md) - [ ] [统计与数据](docs/creativecenter/statistics&data.md) diff --git a/docs/dynamic/banner.md b/docs/dynamic/banner.md index d160928..2df8329 100644 --- a/docs/dynamic/banner.md +++ b/docs/dynamic/banner.md @@ -79,3 +79,54 @@ curl 'https://api.bilibili.com/x/dynamic/feed/dyn/banner?platform=1&position=web + +## 动态首页公告栏 (旧版) + +> https://api.vc.bilibili.com/banner_svr/v1/banner_svr/show + + +*请求方法: GET* + +**URL 参数:** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ---- | ------ | ---- | +| platform | number | 平台? | 不必要 | 默认为 `1` | +| position | string | 位置? | 不必要 | 默认为 `web动态` | + +**JSON 回复:** + +与 [动态首页公告栏 (新版)](#动态首页公告栏-新版) 相同, 除了少了个 `data.banners[].banner_id` + +**示例:** + +```shell +curl 'https://api.vc.bilibili.com/banner_svr/v1/banner_svr/show' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1, + "data": { + "banners": [ + { + "img_url": "https://i0.hdslb.com/bfs/vc/9c699f2acbcad00197e92c401b835d2c6aba8a55.png", + "title": "点击进入", + "link": "https://www.bilibili.com/blackboard/activity-5zJxM3spoS.html", + "platform": 1, + "weight": 1, + "position": "web动态", + "start_time": 1582862523, + "end_time": 2056204800 + } + ] + } +} +``` + +