feat(api): 添加热门卡片与榜单接口及实现
- 新增热门帖子、热门作者、榜单接口及实现 - 新增api-documentation,更好的ai协作 - 修复types没有导出的问题 BREAKING CHANGES: 1.0.0->1.1.0(latest)
This commit is contained in:
@@ -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 {
|
||||
Reference in New Issue
Block a user