diff --git a/articles.md b/articles.md
index 432b826..49e8b67 100644
--- a/articles.md
+++ b/articles.md
@@ -2,6 +2,23 @@
## 列出文章
+
+
+ | 请求 |
+ GET /article |
+
+
+ | 参数 |
+ { category?: number; page?: number } |
+
+
+ | 响应主体 |
+ application/json (LentilleDataResponse<ArticleListData>) |
+
+
+
+## 列出用户文章
+
-## 列出发布的文章
+## 列出创建的文章
@@ -30,7 +47,7 @@
| 响应主体 |
- application/json (LentilleDataResponse<ArticleListData>) |
+ application/json (LentilleDataResponse<CreatedArticleListData>) |
@@ -177,6 +194,23 @@
+## 赞/踩文章
+
+
+
+ | 请求 |
+ POST /api/article/vote/:lid |
+
+
+ | 参数 |
+ { vote: number } |
+
+
+ | 响应主体 |
+ application/json ({ voted: number; upvotes: number }) |
+
+
+
## 申请全站推荐
+## 发表评论
+
+
+
+ | 请求 |
+ POST /article/:lid/reply |
+
+
+ | 请求主体 |
+ application/json ({ content: string }) |
+
+
+ | 响应主体 |
+ application/json ({ reply: Comment }) |
+
+
+
## 删除评论
diff --git a/luogu-api.d.ts b/luogu-api.d.ts
index 696b3a8..1d78942 100644
--- a/luogu-api.d.ts
+++ b/luogu-api.d.ts
@@ -516,6 +516,12 @@ export interface ImageListData {
}
export interface ArticleListData {
+ articles: List;
+ featuredCollections: ArticleCollectionSummary[];
+ category: number | null;
+}
+
+export interface CreatedArticleListData {
articles: List;
stat: { promoted: number; public: number; hidden: number };
}
@@ -530,6 +536,7 @@ export interface ArticleData {
export interface ArticleCollectionData {
articles: List;
+ featuredCollections: ArticleCollectionSummary[];
collection: ArticleCollection;
}
@@ -651,7 +658,7 @@ export interface ProblemSummary {
pid: string;
type: string;
title: string;
- difficulty: number;
+ difficulty: number | null;
}
export interface Problem extends LegacyProblemSummary {
@@ -1103,7 +1110,6 @@ export interface Article {
}
export interface ArticleDetails extends Article {
- id: number;
contentFull: boolean;
adminNote: string | null;
voted?: number | null;
@@ -1118,6 +1124,7 @@ export interface ArticleCollectionSummary {
export interface ArticleCollection extends ArticleCollectionSummary {
opening: boolean;
+ featured: number;
categoryLimitation: null;
}
@@ -1140,10 +1147,10 @@ export interface Blog extends BlogSummary {
}
export interface Comment {
- content: string;
id: number;
- author: UserSummary;
+ author: UserSummary & Maybe;
time: number;
+ content: string;
}
export interface PageTree {