article.api
1.4 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
syntax = "v1"
import "article_type.api"
info(
title: "文章内容处理"
desc: "编辑处理文章内容"
author: "author"
email: "email"
version: "v1"
)
// 小程序接口
@server(
prefix: v1/mini
group: article
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 MiniArticleSearchMe
post /article/search/me (MiniArticleSearchMeRequest) returns (MiniArticleSearchMeResponse)
}
// 管理后台接口
@server(
prefix: v1/system
group: article
jwt: MiniAuth
)
service Core {
@doc "管理后台获取文章内容详情"
@handler SystemGetArticle
get /article/:id (SystemArticleGetRequest) returns (SystemArticleGetResponse)
@doc "管理后台获取文章列表"
@handler SystemSearchArticle
post /article/search (SystemArticleSearchRequest) returns (SystemArticleSearchResponse)
}