diff --git a/doc/zh/.gitbook/assets/1.yaml b/doc/zh/.gitbook/assets/1.yaml new file mode 100644 index 0000000..29eb6dc --- /dev/null +++ b/doc/zh/.gitbook/assets/1.yaml @@ -0,0 +1,106 @@ +openapi: 3.0.0 +info: + title: CVSA API + version: v1 + +servers: + - url: https://api.projectcvsa.com + +paths: + /video/{id}/snapshots: + get: + summary: 获取视频快照列表 + description: 根据视频 ID 获取视频的快照列表。视频 ID 可以是以 "av" 开头的数字,以 "BV" 开头的 12 位字母数字,或者一个正整数。 + parameters: + - in: path + name: id + required: true + schema: + type: string + description: "视频 ID (如: av78977256, BV1KJ411C7CW, 78977256)" + - in: query + name: ps + schema: + type: integer + minimum: 1 + description: 每页返回的快照数量 (pageSize),默认为 1000。 + - in: query + name: pn + schema: + type: integer + minimum: 1 + description: 页码 (pageNumber),用于分页查询。offset 与 pn 只能选择一个。 + - in: query + name: offset + schema: + type: integer + minimum: 1 + description: 偏移量,用于基于偏移量的查询。offset 与 pn 只能选择一个。 + - in: query + name: reverse + schema: + type: boolean + description: 是否反向排序(从旧到新),默认为 false。 + responses: + '200': + description: 成功获取快照列表 + content: + application/json: + schema: + type: array + items: + type: object + properties: + id: + type: integer + description: 快照 ID + aid: + type: integer + description: 视频的 av 号 + views: + type: integer + description: 视频播放量 + coins: + type: integer + description: 视频投币数 + likes: + type: integer + description: 视频点赞数 + favorites: + type: integer + description: 视频收藏数 + shares: + type: integer + description: 视频分享数 + danmakus: + type: integer + description: 视频弹幕数 + replies: + type: integer + description: 视频评论数 + '400': + description: 无效的查询参数 + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: 错误消息 + errors: + type: object + description: 详细的错误信息 + '500': + description: 服务器内部错误 + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: 错误消息 + error: + type: object + description: 详细的错误信息 \ No newline at end of file diff --git a/doc/zh/SUMMARY.md b/doc/zh/SUMMARY.md index 99f76f8..e01f8a3 100644 --- a/doc/zh/SUMMARY.md +++ b/doc/zh/SUMMARY.md @@ -1,11 +1,11 @@ # Table of contents -- [欢迎](README.md) +* [欢迎](README.md) ## 关于 -- [关于本项目](about/this-project.md) -- [收录范围](about/scope-of-inclusion.md) +* [关于本项目](about/this-project.md) +* [收录范围](about/scope-of-inclusion.md) ## 技术架构 @@ -18,5 +18,5 @@ ## API 文档 -- [目录](api-doc/catalog.md) -- [歌曲](api-doc/songs.md) +* [目录](api-doc/catalog.md) +* [视频快照](api-doc/video-snapshot.md) diff --git a/doc/zh/api-doc/catalog.md b/doc/zh/api-doc/catalog.md index b76ea7a..5298b49 100644 --- a/doc/zh/api-doc/catalog.md +++ b/doc/zh/api-doc/catalog.md @@ -1,3 +1,4 @@ # 目录 -- [歌曲](songs.md) +* [视频快照](video-snapshot.md) + diff --git a/doc/zh/api-doc/songs.md b/doc/zh/api-doc/songs.md deleted file mode 100644 index fd3d99c..0000000 --- a/doc/zh/api-doc/songs.md +++ /dev/null @@ -1,3 +0,0 @@ -# 歌曲 - -暂未实现。 diff --git a/doc/zh/api-doc/video-snapshot.md b/doc/zh/api-doc/video-snapshot.md new file mode 100644 index 0000000..c143151 --- /dev/null +++ b/doc/zh/api-doc/video-snapshot.md @@ -0,0 +1,6 @@ +# 视频快照 + +{% openapi src="../.gitbook/assets/1.yaml" path="/video/{id}/snapshots" method="get" %} +[1.yaml](../.gitbook/assets/1.yaml) +{% endopenapi %} +