article.api
6.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
syntax = "v1"
info(
title: "文章内容处理"
desc: "编辑处理文章内容"
author: "author"
email: "email"
version: "v1"
)
// 小程序接口
@server(
prefix: v1/mini
group: article
middleware: LogRequest
jwt: MiniAuth
)
service Core {
@doc "小程序创建发布内容"
@handler MiniCreateArticle
post /article (MiniArticleCreateRequest) returns (MiniArticleCreateResponse)
@doc "小程序获取文章内容详情"
@handler MiniGetArticle
get /article/:id (MiniArticleGetRequest) returns (MiniArticleGetResponse)
@doc "小程序获取文章的点赞人员列表"
@handler MiniUserLikeArticle
post /article/user_like/list (MiniUserLikeArticleRequest) returns (MiniUserLikeArticleResponse)
@doc "小程序人员操作点赞文章/评论"
@handler MiniSetUserLike
post /article/user_like/set (MiniSetUserLikeRequset) returns (MiniSetUserLikeResponse)
@doc "小程序标记当前人员查看的文章"
@handler MiniArticleMarkUserRead
post /article/mark/user_read (MiniArticleMarkUserReadRequest) returns (MiniArticleMarkUserReadResponse)
@doc "小程序获取文章浏览记录"
@handler MiniArticleMarkList
post /article/mark/list (MiniArticleMarkListRequest) returns (MiniArticleMarkListResponse)
@doc "小程序获取我发布的文章"
@handler MiniArticleSearchMe
post /article/search/me (MiniArticleSearchMeRequest) returns (MiniArticleSearchMeResponse)
@doc "小程序我的帖子设置可见范围"
@handler MiniArticleSetView
post /article/set_view (MiniArticleSetViewRequest) returns (MiniArticleSetViewResponse)
@doc "小程序删除我的帖子"
@handler MiniArticleDelete
delete /article/delete (MiniArticleDeleteRequest) returns (MiniArticleDeleteResponse)
@doc "小程序创建文章进草稿箱"
@handler MiniCreateArticleDraft
post /article_draft (MiniArticleDraftCreateRequest) returns (MiniArticleDraftCreateResponse)
@doc "小程序更新文章草稿"
@handler MiniUpdateArticleDraft
put /article_draft (MiniArticleDraftUpdateRequest) returns (MiniArticleDraftUpdateResponse)
@doc "小程序获取我的草稿箱列表"
@handler MiniSearchArticleDraftMe
post /article_draft/search/me (MiniArticleDraftSearchMeRequest) returns (MiniArticleDraftSearchMeResponse)
@doc "小程序获取我的草稿内容"
@handler MiniGetArticleDraftMe
get /article_draft/me/:id (MiniArticleDraftGetMeRequest) returns (MiniArticleDraftGetMeResponse)
@doc "小程序删除我的草稿内容"
@handler MiniDeleteArticleDraftMe
delete /article_draft/me/:id (MiniArticleDraftDeleteMeRequest) returns (MiniArticleDraftDeleteMeResponse)
@doc "小程序获取文章的编辑记录"
@handler MiniArticleBackupSearch
post /article_backup/search (MiniArticleBackupSearchRequest) returns (MiniArticleBackupSearchResponse)
@doc "小程序获取文章的编辑记录"
@handler MiniGetArticleBackup
get /article_backup/:id (MiniGetArticleBackupRequest) returns (MiniGetArticleBackupResponse)
@doc "小程序设置文章的定性标签"
@handler MiniArticleSetTag
post /article/set_tag (MiniArticleSetTagRequest) returns (MiniArticleSetTagResponse)
@doc "小程序所有的定性标签"
@handler MiniAllArticleTag
get /article_tag/list/all (MiniAllArticleTagRequest) returns (MiniAllArticleTagResponse)
@doc "小程序首页数据展示"
@handler MiniShowHomePage
get /show/home_page (MiniHomePageRequest) returns (MiniHomePageResponse)
@doc "小程序首页搜索文章"
@handler MiniSearchArticlePage
post /show/search_article (MiniSearchArticleRequest) returns (MiniSearchArticleResponse)
}
// 管理后台接口
@server(
prefix: v1/system
group: article
middleware: LoginStatusCheck,LogRequest
jwt: SystemAuth
)
service Core {
@doc "管理后台获取文章内容详情"
@handler SystemGetArticle
get /article/:id (SystemArticleGetRequest) returns (SystemArticleGetResponse)
@doc "管理后台获取文章列表"
@handler SystemSearchArticle
post /article/search (SystemArticleSearchRequest) returns (SystemArticleSearchResponse)
@doc "管理后台编辑帖子"
@handler SystemUpdateArticle
put /article (SystemArticleUpdateRequest) returns (SystemArticleUpdateResponse)
@doc "管理后台编辑历史"
@handler SystemHistoryArticle
post /article/history (SystemArticleHistoryRequest) returns (SystemArticleHistoryResponse)
@doc "管理后台帖子历史详情"
@handler SystemArticleGetHistory
get /article/history/:id (SystemArticleGetHistoryRequest) returns (SystemArticleGetHistoryResponse)
@doc "管理后台获取我发布的文章"
@handler SystemArticleSearchMe
post /article/search/me (SystemArticleSearchMeRequest) returns (SystemArticleSearchMeResponse)
@doc "管理后台文章恢复"
@handler SystemArticleRestore
post /article/restore (SystemArticleRestoreRequest) returns (SystemArticleRestoreResponse)
@doc "管理后台删除文章"
@handler SystemDeleteArticle
delete /article (SystemArticleDeleteRequest) returns (SystemArticleDeleteResponse)
@doc "管理后台新增文章"
@handler SystemCreateArticle
post /article (SystemArticleCreateRequest) returns (SystemArticleCreateResponse)
@doc "管理后台新增草稿"
@handler SystemCreateArticleDraft
post /article/draft (SystemArticleDraftCreateRequest) returns (SystemArticleDraftCreateResponse)
@doc "管理后台编辑草稿"
@handler SystemUpdateArticleDraft
put /article/draft (SystemArticleDraftUpdateRequest) returns (SystemArticleDraftUpdateResponse)
@doc "管理后台草稿列表"
@handler SystemSearchArticleDraft
post /article/draft/search (SystemArticleDraftSearchRequest) returns (SystemArticleDraftSearchResponse)
@doc "管理后台删除草稿"
@handler SystemDeleteArticleDraft
delete /article/draft (SystemArticleDraftDeleteRequest) returns (SystemArticleDraftDeleteResponse)
@doc "管理后台获取草稿"
@handler SystemGetArticleDraft
get /article/draft/:id (SystemArticleDraftGetRequest) returns (SystemArticleDraftGetResponse)
@doc "管理后台已删除列表"
@handler SystemArticleSearchDeleted
post /article/deleted/list (SystemArticleSearchDeletedRequest) returns (SystemArticleSearchDeletedResponse)
@doc "管理后台文章删除恢复"
@handler SystemRestoreArticleDeleted
put /article/deleted/restore (SystemArticleDeletedRestoreRequest) returns (SystemArticleDeletedRestoreResponse)
}