99 * ---------------------------------------------------------------
1010 */
1111
12- import { IArticle } from '../types/data-contracts' ;
12+ import {
13+ checkPasswordData ,
14+ createData ,
15+ deleteByIdData ,
16+ findAllData ,
17+ findArticlesByCategoryData ,
18+ findArticlesByTagData ,
19+ findByIdData ,
20+ getArchivesData ,
21+ getRecommendArticlesData ,
22+ recommendData ,
23+ updateByIdData ,
24+ updateLikesByIdData ,
25+ updateViewsByIdData ,
26+ } from '../types/data-contracts' ;
1327import { HttpClient , RequestParams } from './HttpClient' ;
1428
1529export class Article < SecurityDataType = unknown > extends HttpClient < SecurityDataType > {
1630 /**
1731 * No description
1832 *
1933 * @tags Article
20- * @name Articlecreate
34+ * @name create
2135 * @request POST:/article
36+ * @response `200` `createData` 创建文章
2237 */
23- articlecreate = ( params : RequestParams = { } ) =>
24- this . request < IArticle [ ] , any > ( {
38+ create = ( params : RequestParams = { } ) =>
39+ this . request < createData , any > ( {
2540 path : `/article` ,
2641 method : 'POST' ,
27- format : 'json' ,
2842 ...params ,
2943 } ) ;
3044 /**
3145 * No description
3246 *
3347 * @tags Article
34- * @name ArticlefindAll
48+ * @name findAll
3549 * @request GET:/article
50+ * @response `200` `findAllData`
3651 */
37- articlefindAll = ( params : RequestParams = { } ) =>
38- this . request < void , any > ( {
52+ findAll = ( params : RequestParams = { } ) =>
53+ this . request < findAllData , any > ( {
3954 path : `/article` ,
4055 method : 'GET' ,
4156 ...params ,
@@ -44,11 +59,12 @@ export class Article<SecurityDataType = unknown> extends HttpClient<SecurityData
4459 * No description
4560 *
4661 * @tags Article
47- * @name ArticlefindArticlesByCategory
62+ * @name findArticlesByCategory
4863 * @request GET:/article/category/{id}
64+ * @response `200` `findArticlesByCategoryData`
4965 */
50- articlefindArticlesByCategory = ( id : string , params : RequestParams = { } ) =>
51- this . request < void , any > ( {
66+ findArticlesByCategory = ( id : string , params : RequestParams = { } ) =>
67+ this . request < findArticlesByCategoryData , any > ( {
5268 path : `/article/category/${ id } ` ,
5369 method : 'GET' ,
5470 ...params ,
@@ -57,11 +73,12 @@ export class Article<SecurityDataType = unknown> extends HttpClient<SecurityData
5773 * No description
5874 *
5975 * @tags Article
60- * @name ArticlefindArticlesByTag
76+ * @name findArticlesByTag
6177 * @request GET:/article/tag/{id}
78+ * @response `200` `findArticlesByTagData`
6279 */
63- articlefindArticlesByTag = ( id : string , params : RequestParams = { } ) =>
64- this . request < void , any > ( {
80+ findArticlesByTag = ( id : string , params : RequestParams = { } ) =>
81+ this . request < findArticlesByTagData , any > ( {
6582 path : `/article/tag/${ id } ` ,
6683 method : 'GET' ,
6784 ...params ,
@@ -70,11 +87,12 @@ export class Article<SecurityDataType = unknown> extends HttpClient<SecurityData
7087 * No description
7188 *
7289 * @tags Article
73- * @name ArticlegetRecommendArticles
90+ * @name getRecommendArticles
7491 * @request GET:/article/all/recommend
92+ * @response `200` `getRecommendArticlesData`
7593 */
76- articlegetRecommendArticles = ( params : RequestParams = { } ) =>
77- this . request < void , any > ( {
94+ getRecommendArticles = ( params : RequestParams = { } ) =>
95+ this . request < getRecommendArticlesData , any > ( {
7896 path : `/article/all/recommend` ,
7997 method : 'GET' ,
8098 ...params ,
@@ -83,11 +101,12 @@ export class Article<SecurityDataType = unknown> extends HttpClient<SecurityData
83101 * No description
84102 *
85103 * @tags Article
86- * @name ArticlegetArchives
104+ * @name getArchives
87105 * @request GET:/article/archives
106+ * @response `200` `getArchivesData`
88107 */
89- articlegetArchives = ( params : RequestParams = { } ) =>
90- this . request < void , any > ( {
108+ getArchives = ( params : RequestParams = { } ) =>
109+ this . request < getArchivesData , any > ( {
91110 path : `/article/archives` ,
92111 method : 'GET' ,
93112 ...params ,
@@ -96,11 +115,12 @@ export class Article<SecurityDataType = unknown> extends HttpClient<SecurityData
96115 * No description
97116 *
98117 * @tags Article
99- * @name Articlerecommend
118+ * @name recommend
100119 * @request GET:/article/recommend
120+ * @response `200` `recommendData`
101121 */
102- articlerecommend = ( params : RequestParams = { } ) =>
103- this . request < void , any > ( {
122+ recommend = ( params : RequestParams = { } ) =>
123+ this . request < recommendData , any > ( {
104124 path : `/article/recommend` ,
105125 method : 'GET' ,
106126 ...params ,
@@ -109,11 +129,12 @@ export class Article<SecurityDataType = unknown> extends HttpClient<SecurityData
109129 * No description
110130 *
111131 * @tags Article
112- * @name ArticlefindById
132+ * @name findById
113133 * @request GET:/article/{id}
134+ * @response `200` `findByIdData`
114135 */
115- articlefindById = ( id : string , params : RequestParams = { } ) =>
116- this . request < void , any > ( {
136+ findById = ( id : string , params : RequestParams = { } ) =>
137+ this . request < findByIdData , any > ( {
117138 path : `/article/${ id } ` ,
118139 method : 'GET' ,
119140 ...params ,
@@ -122,11 +143,12 @@ export class Article<SecurityDataType = unknown> extends HttpClient<SecurityData
122143 * No description
123144 *
124145 * @tags Article
125- * @name ArticleupdateById
146+ * @name updateById
126147 * @request PATCH:/article/{id}
148+ * @response `200` `updateByIdData`
127149 */
128- articleupdateById = ( id : string , params : RequestParams = { } ) =>
129- this . request < void , any > ( {
150+ updateById = ( id : string , params : RequestParams = { } ) =>
151+ this . request < updateByIdData , any > ( {
130152 path : `/article/${ id } ` ,
131153 method : 'PATCH' ,
132154 ...params ,
@@ -135,11 +157,12 @@ export class Article<SecurityDataType = unknown> extends HttpClient<SecurityData
135157 * No description
136158 *
137159 * @tags Article
138- * @name ArticledeleteById
160+ * @name deleteById
139161 * @request DELETE:/article/{id}
162+ * @response `200` `deleteByIdData`
140163 */
141- articledeleteById = ( id : string , params : RequestParams = { } ) =>
142- this . request < void , any > ( {
164+ deleteById = ( id : string , params : RequestParams = { } ) =>
165+ this . request < deleteByIdData , any > ( {
143166 path : `/article/${ id } ` ,
144167 method : 'DELETE' ,
145168 ...params ,
@@ -148,11 +171,12 @@ export class Article<SecurityDataType = unknown> extends HttpClient<SecurityData
148171 * No description
149172 *
150173 * @tags Article
151- * @name ArticlecheckPassword
174+ * @name checkPassword
152175 * @request POST:/article/{id}/checkPassword
176+ * @response `200` `checkPasswordData`
153177 */
154- articlecheckPassword = ( id : string , params : RequestParams = { } ) =>
155- this . request < void , any > ( {
178+ checkPassword = ( id : string , params : RequestParams = { } ) =>
179+ this . request < checkPasswordData , any > ( {
156180 path : `/article/${ id } /checkPassword` ,
157181 method : 'POST' ,
158182 ...params ,
@@ -161,11 +185,12 @@ export class Article<SecurityDataType = unknown> extends HttpClient<SecurityData
161185 * No description
162186 *
163187 * @tags Article
164- * @name ArticleupdateViewsById
188+ * @name updateViewsById
165189 * @request POST:/article/{id}/views
190+ * @response `200` `updateViewsByIdData`
166191 */
167- articleupdateViewsById = ( id : string , params : RequestParams = { } ) =>
168- this . request < void , any > ( {
192+ updateViewsById = ( id : string , params : RequestParams = { } ) =>
193+ this . request < updateViewsByIdData , any > ( {
169194 path : `/article/${ id } /views` ,
170195 method : 'POST' ,
171196 ...params ,
@@ -174,11 +199,12 @@ export class Article<SecurityDataType = unknown> extends HttpClient<SecurityData
174199 * No description
175200 *
176201 * @tags Article
177- * @name ArticleupdateLikesById
202+ * @name updateLikesById
178203 * @request POST:/article/{id}/likes
204+ * @response `200` `updateLikesByIdData`
179205 */
180- articleupdateLikesById = ( id : string , params : RequestParams = { } ) =>
181- this . request < void , any > ( {
206+ updateLikesById = ( id : string , params : RequestParams = { } ) =>
207+ this . request < updateLikesByIdData , any > ( {
182208 path : `/article/${ id } /likes` ,
183209 method : 'POST' ,
184210 ...params ,
0 commit comments