feat(api): 添加热门卡片与榜单接口及实现

- 新增热门帖子、热门作者、榜单接口及实现
- 新增api-documentation,更好的ai协作
- 修复types没有导出的问题

BREAKING CHANGES: 1.0.0->1.1.0(latest)
This commit is contained in:
tobegold574
2025-11-18 22:29:40 +08:00
parent c3a8a525cb
commit a0c907beed
28 changed files with 1074 additions and 15 deletions

View File

@@ -111,6 +111,33 @@ export interface LikeCommentResponse {
success: boolean;
}
// 获取热门帖子请求接口
export interface GetHotPostsRequest {
limit?: number; // 每页数量
days?: number; // 统计天数默认7天
}
// 获取热门帖子响应接口
export interface GetHotPostsResponse {
data: Post[]; // 数据列表
total: number; // 总数
}
// 获取帖子榜单请求接口
export interface GetPostRankingRequest {
limit?: number; // 每页数量
period?: 'day' | 'week' | 'month'; // 统计周期
type?: 'views' | 'likes' | 'comments'; // 排序类型
}
// 获取帖子榜单响应接口
export interface GetPostRankingResponse {
data: Post[]; // 数据列表
total: number; // 总数
period: 'day' | 'week' | 'month'; // 统计周期
type: 'views' | 'likes' | 'comments'; // 排序类型
}
// 后面全部暂时不考虑
// 删除帖子请求接口
export interface DeletePostRequest {