-
Notifications
You must be signed in to change notification settings - Fork 5
/
meowchat.api
226 lines (204 loc) · 5.88 KB
/
meowchat.api
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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
syntax = "v1"
info(
title: "cat community api"
)
import "idl/auth.api"
import "idl/post.api"
import "idl/collection.api"
import "idl/moment.api"
import "idl/comment.api"
import "idl/system.api"
import "idl/like.api"
import "idl/user.api"
import "idl/sts.api"
@server(
group: auth
prefix: auth
)
service meowchat {
// auth
@handler SignIn
post /sign_in (SignInReq) returns (SignInResp)
@handler SendVerifyCode
post /send_verify_code (SendVerifyCodeReq) returns (SendVerifyCodeResp)
}
@server(
group: auth
prefix: auth
jwt: Auth
)
service meowchat {
// auth
@handler SetPassword
post /set_password (SetPasswordReq) returns (SetPasswordResp)
}
@server(
group: system
jwt: Auth
)
service meowchat {
// system
// admin
@handler GetAdmins
get /notice/get_admins (GetAdminsReq) returns (GetAdminsResp)
@handler NewAdmin
post /notice/new_admin (NewAdminReq) returns (NewAdminResp)
@handler DeleteAdmin
post /notice/delete_admin (DeleteAdminReq) returns (DeleteAdminResp)
@handler ListApply
post /notice/list_apply (ListApplyReq) returns (ListApplyResp)
@handler HandleApply
post /notice/handle_apply (HandleApplyReq) returns (HandleApplyResp)
// news
@handler GetNews
get /notice/get_news (GetNewsReq) returns (GetNewsResp)
@handler NewNews
post /notice/new_news (NewNewsReq) returns (NewNewsResp)
@handler DeleteNews
post /notice/remove_news (DeleteNewsReq) returns (DeleteNewsResp)
// system
@handler GetNotices
get /notice/get_notices (GetNoticesReq) returns (GetNoticesResp)
@handler NewNotice
post /notice/new_notice (NewNoticeReq) returns (NewNoticeResp)
@handler DeleteNotice
post /notice/remove_notice (DeleteNoticeReq) returns (DeleteNoticeResp)
// community
@handler ListCommunity
get /community/list_community (ListCommunityReq) returns (ListCommunityResp)
@handler NewCommunity
post /community/new_community (NewCommunityReq) returns (NewCommunityResp)
@handler DeleteCommunity
post /community/delete_community (DeleteCommunityReq) returns (DeleteCommunityResp)
// role
@handler GetUserRoles
get /role/get_user_roles (GetUserRolesReq) returns (GetUserRolesResp)
@handler UpdateCommunityAdmin
post /role/update_community_admin (UpdateCommunityAdminReq) returns (UpdateCommunityAdminResp)
@handler UpdateSuperAdmin
post /role/update_super_admin (UpdateSuperAdminReq) returns (UpdateSuperAdminResp)
@handler GetUserByRole
get /role/Get_User_By_Role (RetrieveUserPreviewReq) returns (RetrieveUserPreviewResp)
}
@server(
group: like
prefix: like
jwt: Auth
)
service meowchat {
// like
@handler DoLike
post /do_like (DoLikeReq) returns (DoLikeResp)
@handler GetUserLiked
get /get_user_liked (GetUserLikedReq) returns (GetUserLikedResp)
@handler GetLikedCount
get /get_count (GetLikedCountReq) returns (GetLikedCountResp)
@handler GetLikedUsers
get /get_liked_users (GetLikedUsersReq) returns (GetLikedUsersResp)
@handler GetUserLikes
get /get_user_likes (GetUserLikesReq) returns (GetUserLikesResp)
}
@server(
group: post
prefix: post
jwt: Auth
)
service meowchat {
// post
@handler GetPostPreviews
post /get_post_previews (GetPostPreviewsReq) returns (GetPostPreviewsResp)
@handler GetPostDetail
get /get_post_detail (GetPostDetailReq) returns (GetPostDetailResp)
@handler NewPost
post /new_post (NewPostReq) returns (NewPostResp)
@handler DeletePost
post /delete_post (DeletePostReq) returns (DeletePostResp)
@handler SetOfficial
post /set_official (SetOfficialReq) returns (SetOfficialResp)
}
@server(
group: collection
prefix: collection
jwt: Auth
)
service meowchat {
// collection
@handler GetCatPreviews
get /get_cat_previews (GetCatPreviewsReq) returns (GetCatPreviewsResp)
@handler GetCatDetail
get /get_cat_detail (GetCatDetailReq) returns (GetCatDetailResp)
@handler NewCat
post /new_cat (NewCatReq) returns (NewCatResp)
@handler DeleteCat
post /delete_cat (DeleteCatReq) returns (DeleteCatResp)
@handler SearchCat
get /search_cat (SearchCatReq) returns (SearchCatResp)
@handler CreateImage
post /create_image(CreateImageReq) returns (CreateImageResp)
@handler DeleteImage
post /delete_image(DeleteImageReq) returns (DeleteImageResp)
@handler GetImageByCat
get /get_image_by_cat(GetImageByCatReq) returns (GetImageByCatResp)
}
@server(
group: moment
prefix: moment
jwt: Auth
)
service meowchat {
// moment
@handler GetMomentPreviews
get /get_moment_previews (GetMomentPreviewsReq) returns (GetMomentPreviewsResp)
@handler GetMomentDetail
get /get_moment_detail (GetMomentDetailReq) returns (GetMomentDetailResp)
@handler NewMoment
post /new_moment (NewMomentReq) returns (NewMomentResp)
@handler DeleteMoment
post /delete_moment (DeleteMomentReq) returns (DeleteMomentResp)
@handler SearchMoment
get /search_moment (SearchMomentReq) returns (SearchMomentResp)
}
@server(
group: comment
prefix: comment
jwt: Auth
)
service meowchat {
// comment
@handler GetComments
get /get_comments (GetCommentsReq) returns (GetCommentsResp)
@handler NewComment
post /new_comment (NewCommentReq) returns (NewCommentResp)
@handler DeleteComment
post /delete_comment (DeleteCommentReq) returns (DeleteCommentResp)
}
@server(
group: user
prefix: user
jwt: Auth
)
service meowchat {
// user
@handler GetUserInfo
get /get_user_info (GetUserInfoReq) returns (GetUserInfoResp)
@handler UpdateUserInfo
post /update_user_info (UpdateUserInfoReq) returns (UpdateUserInfoResp)
@handler SearchUser
get /search_user (SearchUserReq) returns (SearchUserResp)
@handler SearchUserForAdmin
get /search_user_for_admin(SearchUserForAdminReq) returns (SearchUserForAdminResp)
@handler CreateApply
post /create_apply (CreateApplyReq) returns (CreateApplyResp)
}
@server(
group: sts
prefix: sts
jwt: Auth
)
service meowchat {
// sts
@handler ApplySignedUrl
post /apply_signed_url (ApplySignedUrlReq) returns (ApplySignedUrlResp)
@handler ApplySignedUrlAsCommunity
post /apply_signed_url_as_community (ApplySignedUrlAsCommunityReq) returns (ApplySignedUrlAsCommunityResp)
}