|
@@ -41,21 +41,21 @@ type (
|
|
|
LoginReq {
|
|
LoginReq {
|
|
|
Phone string `json:"phone"`
|
|
Phone string `json:"phone"`
|
|
|
Password string `json:"password"`
|
|
Password string `json:"password"`
|
|
|
- Code string `json:"code"`
|
|
|
|
|
|
|
+ Code string `json:"code,optional"`
|
|
|
LoginType int32 `json:"login_type"`
|
|
LoginType int32 `json:"login_type"`
|
|
|
- LoginIp string `json:"login_ip"`
|
|
|
|
|
|
|
+ LoginIp string `json:"login_ip,optional"`
|
|
|
}
|
|
}
|
|
|
RegisterReq {
|
|
RegisterReq {
|
|
|
Phone string `json:"phone"`
|
|
Phone string `json:"phone"`
|
|
|
- Nickname string `json:"nickname"`
|
|
|
|
|
|
|
+ Nickname string `json:"nickname,optional"`
|
|
|
Password string `json:"password"`
|
|
Password string `json:"password"`
|
|
|
- Avatar string `json:"avatar"`
|
|
|
|
|
- Sex int32 `json:"sex"`
|
|
|
|
|
- Username string `json:"username"`
|
|
|
|
|
- Code string `json:"code"`
|
|
|
|
|
|
|
+ Avatar string `json:"avatar,optional"`
|
|
|
|
|
+ Sex int32 `json:"sex,default=1"`
|
|
|
|
|
+ Username string `json:"username,optional"`
|
|
|
|
|
+ Code string `json:"code,optional"`
|
|
|
}
|
|
}
|
|
|
GetUserInfoReq {
|
|
GetUserInfoReq {
|
|
|
- QueryUserId int64 `json:"query_user_id"`
|
|
|
|
|
|
|
+ QueryUserId int64 `form:"query_user_id"`
|
|
|
}
|
|
}
|
|
|
GetUserInfoResp {
|
|
GetUserInfoResp {
|
|
|
Id int64 `json:"id"`
|
|
Id int64 `json:"id"`
|
|
@@ -65,9 +65,9 @@ type (
|
|
|
IsFollow bool `json:"is_follow"`
|
|
IsFollow bool `json:"is_follow"`
|
|
|
}
|
|
}
|
|
|
FindUserReq {
|
|
FindUserReq {
|
|
|
- Username string `json:"username"`
|
|
|
|
|
- Phone string `json:"phone"`
|
|
|
|
|
- Ids []int64 `json:"ids"`
|
|
|
|
|
|
|
+ Username string `json:"username,optional"`
|
|
|
|
|
+ Phone string `json:"phone,optional"`
|
|
|
|
|
+ Ids []int64 `json:"ids,optional"`
|
|
|
}
|
|
}
|
|
|
FindUserResp {
|
|
FindUserResp {
|
|
|
UserList []UserInfo `json:"user_list"`
|
|
UserList []UserInfo `json:"user_list"`
|
|
@@ -85,25 +85,25 @@ type (
|
|
|
Success bool `json:"success"`
|
|
Success bool `json:"success"`
|
|
|
}
|
|
}
|
|
|
GetFollowingReq {
|
|
GetFollowingReq {
|
|
|
- PageSize int32 `json:"page_size"`
|
|
|
|
|
- Page int32 `json:"page"`
|
|
|
|
|
- QueryUserId int64 `json:"query_user_id"`
|
|
|
|
|
|
|
+ PageSize int32 `form:"page_size,default=10"`
|
|
|
|
|
+ Page int32 `form:"page,default=1"`
|
|
|
|
|
+ QueryUserId int64 `form:"query_user_id"`
|
|
|
}
|
|
}
|
|
|
GetFollowingRes {
|
|
GetFollowingRes {
|
|
|
List []FollowUserInfo `json:"list"`
|
|
List []FollowUserInfo `json:"list"`
|
|
|
Total int64 `json:"total"`
|
|
Total int64 `json:"total"`
|
|
|
}
|
|
}
|
|
|
GetFollowReq {
|
|
GetFollowReq {
|
|
|
- PageSize int32 `json:"page_size"`
|
|
|
|
|
- Page int32 `json:"page"`
|
|
|
|
|
- QueryUserId int64 `json:"query_user_id"`
|
|
|
|
|
|
|
+ PageSize int32 `form:"page_size,default=10"`
|
|
|
|
|
+ Page int32 `form:"page,default=1"`
|
|
|
|
|
+ QueryUserId int64 `form:"query_user_id"`
|
|
|
}
|
|
}
|
|
|
GetFollowRes {
|
|
GetFollowRes {
|
|
|
List []FollowUserInfo `json:"list"`
|
|
List []FollowUserInfo `json:"list"`
|
|
|
Total int64 `json:"total"`
|
|
Total int64 `json:"total"`
|
|
|
}
|
|
}
|
|
|
GetUserProfileReq {
|
|
GetUserProfileReq {
|
|
|
- UserId int64 `json:"user_id"`
|
|
|
|
|
|
|
+ UserId int64 `form:"user_id"`
|
|
|
}
|
|
}
|
|
|
GetUserProfileRes {
|
|
GetUserProfileRes {
|
|
|
Id int64 `json:"id"`
|
|
Id int64 `json:"id"`
|
|
@@ -122,10 +122,9 @@ type (
|
|
|
Sex int32 `json:"sex"`
|
|
Sex int32 `json:"sex"`
|
|
|
}
|
|
}
|
|
|
SearchUsernameReq {
|
|
SearchUsernameReq {
|
|
|
- Keyword string `json:"keyword"`
|
|
|
|
|
- Page int32 `json:"page"`
|
|
|
|
|
- PageSize int32 `json:"page_size"`
|
|
|
|
|
- UserId int64 `json:"user_id"`
|
|
|
|
|
|
|
+ Keyword string `form:"keyword"`
|
|
|
|
|
+ Page int32 `form:"page,default=1"`
|
|
|
|
|
+ PageSize int32 `form:"page_size,default=10"`
|
|
|
}
|
|
}
|
|
|
SearchUsernameItem {
|
|
SearchUsernameItem {
|
|
|
Nickname string `json:"nickname"`
|
|
Nickname string `json:"nickname"`
|
|
@@ -145,24 +144,22 @@ type (
|
|
|
CreatePostReq {
|
|
CreatePostReq {
|
|
|
Title string `json:"title"`
|
|
Title string `json:"title"`
|
|
|
Content string `json:"content"`
|
|
Content string `json:"content"`
|
|
|
- Tags []CreateTag `json:"tags"`
|
|
|
|
|
- AtUserIds []int64 `json:"at_user_ids"`
|
|
|
|
|
|
|
+ Tags []CreateTag `json:"tags,optional"`
|
|
|
|
|
+ AtUserIds []int64 `json:"at_user_ids,optional"`
|
|
|
PostType int32 `json:"post_type"`
|
|
PostType int32 `json:"post_type"`
|
|
|
Visibility int32 `json:"visibility"`
|
|
Visibility int32 `json:"visibility"`
|
|
|
Images []string `json:"images"`
|
|
Images []string `json:"images"`
|
|
|
- VideoCover string `json:"video_cover"`
|
|
|
|
|
- VideoUrl string `json:"video_url"`
|
|
|
|
|
- Ip string `json:"ip"`
|
|
|
|
|
- IpLoc string `json:"ip_loc"`
|
|
|
|
|
|
|
+ VideoCover string `json:"video_cover,optional"`
|
|
|
|
|
+ VideoUrl string `json:"video_url,optional"`
|
|
|
}
|
|
}
|
|
|
CreatePostRsp {
|
|
CreatePostRsp {
|
|
|
PostId int64 `json:"post_id"`
|
|
PostId int64 `json:"post_id"`
|
|
|
}
|
|
}
|
|
|
GetTagListReq {
|
|
GetTagListReq {
|
|
|
- Page int32 `json:"page"`
|
|
|
|
|
- PageSize int32 `json:"page_size"`
|
|
|
|
|
- TagName string `json:"tag_name"`
|
|
|
|
|
- SortBy int32 `json:"sort_by"`
|
|
|
|
|
|
|
+ Page int32 `form:"page,default=1"`
|
|
|
|
|
+ PageSize int32 `form:"page_size,default=10"`
|
|
|
|
|
+ TagName string `form:"tag_name"`
|
|
|
|
|
+ SortBy int32 `form:"sort_by"`
|
|
|
}
|
|
}
|
|
|
TagItem {
|
|
TagItem {
|
|
|
Name string `json:"name"`
|
|
Name string `json:"name"`
|
|
@@ -176,7 +173,7 @@ type (
|
|
|
Total int32 `json:"total"`
|
|
Total int32 `json:"total"`
|
|
|
}
|
|
}
|
|
|
GetTagReq {
|
|
GetTagReq {
|
|
|
- TagId int64 `json:"tag_id"`
|
|
|
|
|
|
|
+ TagId int64 `form:"tag_id"`
|
|
|
}
|
|
}
|
|
|
GetTagRsp {
|
|
GetTagRsp {
|
|
|
Name string `json:"name"`
|
|
Name string `json:"name"`
|
|
@@ -189,11 +186,11 @@ type (
|
|
|
IsFollowed bool `json:"is_followed"`
|
|
IsFollowed bool `json:"is_followed"`
|
|
|
}
|
|
}
|
|
|
GetPostListReq {
|
|
GetPostListReq {
|
|
|
- Page int32 `json:"page"`
|
|
|
|
|
- PageSize int32 `json:"page_size"`
|
|
|
|
|
- SearchType int32 `json:"search_type"`
|
|
|
|
|
- SortType int32 `json:"sort_type"`
|
|
|
|
|
- Keyword string `json:"keyword"`
|
|
|
|
|
|
|
+ Page int32 `form:"page,default=1"`
|
|
|
|
|
+ PageSize int32 `form:"page_size,default=10"`
|
|
|
|
|
+ SearchType int32 `form:"search_type,optional"`
|
|
|
|
|
+ SortType int32 `form:"sort_type,optional"`
|
|
|
|
|
+ Keyword string `form:"keyword,optional"`
|
|
|
}
|
|
}
|
|
|
GetPostListItem {
|
|
GetPostListItem {
|
|
|
Id int64 `json:"id"`
|
|
Id int64 `json:"id"`
|
|
@@ -222,7 +219,7 @@ type (
|
|
|
Total int64 `json:"total"`
|
|
Total int64 `json:"total"`
|
|
|
}
|
|
}
|
|
|
GetPostReq {
|
|
GetPostReq {
|
|
|
- PostId int64 `json:"post_id"`
|
|
|
|
|
|
|
+ PostId int64 `form:"post_id"`
|
|
|
}
|
|
}
|
|
|
GetPostRsp {
|
|
GetPostRsp {
|
|
|
Id int64 `json:"id"`
|
|
Id int64 `json:"id"`
|
|
@@ -270,10 +267,8 @@ type (
|
|
|
PostCommentReq {
|
|
PostCommentReq {
|
|
|
PostId int64 `json:"post_id"`
|
|
PostId int64 `json:"post_id"`
|
|
|
Content string `json:"content"`
|
|
Content string `json:"content"`
|
|
|
- Image string `json:"image"`
|
|
|
|
|
- AtUserId int64 `json:"at_user_id"`
|
|
|
|
|
- Ip string `json:"ip"`
|
|
|
|
|
- IpLoc string `json:"ip_loc"`
|
|
|
|
|
|
|
+ Image string `json:"image,optional"`
|
|
|
|
|
+ AtUserId int64 `json:"at_user_id,optional"`
|
|
|
}
|
|
}
|
|
|
PostCommentRsp {
|
|
PostCommentRsp {
|
|
|
CommentId int64 `json:"comment_id"`
|
|
CommentId int64 `json:"comment_id"`
|
|
@@ -281,20 +276,18 @@ type (
|
|
|
PostReplyReq {
|
|
PostReplyReq {
|
|
|
PostId int64 `json:"post_id"`
|
|
PostId int64 `json:"post_id"`
|
|
|
Content string `json:"content"`
|
|
Content string `json:"content"`
|
|
|
- Image string `json:"image"`
|
|
|
|
|
- AtUserId int64 `json:"at_user_id"`
|
|
|
|
|
- Ip string `json:"ip"`
|
|
|
|
|
- IpLoc string `json:"ip_loc"`
|
|
|
|
|
|
|
+ Image string `json:"image,optional"`
|
|
|
|
|
+ AtUserId int64 `json:"at_user_id,optional"`
|
|
|
CommentId int64 `json:"comment_id"`
|
|
CommentId int64 `json:"comment_id"`
|
|
|
- ToReplyId int64 `json:"to_reply_id"`
|
|
|
|
|
|
|
+ ToReplyId int64 `json:"to_reply_id,optional"`
|
|
|
}
|
|
}
|
|
|
PostReplyRsp {
|
|
PostReplyRsp {
|
|
|
ReplyId int64 `json:"reply_id"`
|
|
ReplyId int64 `json:"reply_id"`
|
|
|
}
|
|
}
|
|
|
GetPostCommentListReq {
|
|
GetPostCommentListReq {
|
|
|
- Page int32 `json:"page"`
|
|
|
|
|
- PageSize int32 `json:"page_size"`
|
|
|
|
|
- PostId int64 `json:"post_id"`
|
|
|
|
|
|
|
+ Page int32 `form:"page,default=1"`
|
|
|
|
|
+ PageSize int32 `form:"page_size,default=10"`
|
|
|
|
|
+ PostId int64 `form:"post_id"`
|
|
|
}
|
|
}
|
|
|
RepliesItem {
|
|
RepliesItem {
|
|
|
Id int64 `json:"id"`
|
|
Id int64 `json:"id"`
|
|
@@ -329,9 +322,9 @@ type (
|
|
|
Total int64 `json:"total"`
|
|
Total int64 `json:"total"`
|
|
|
}
|
|
}
|
|
|
GetReplyListReq {
|
|
GetReplyListReq {
|
|
|
- Page int32 `json:"page"`
|
|
|
|
|
- PageSize int32 `json:"page_size"`
|
|
|
|
|
- CommentId int64 `json:"comment_id"`
|
|
|
|
|
|
|
+ Page int32 `from:"page,default=1"`
|
|
|
|
|
+ PageSize int32 `from:"page_size,default=10"`
|
|
|
|
|
+ CommentId int64 `from:"comment_id"`
|
|
|
}
|
|
}
|
|
|
GetReplyListRsp {
|
|
GetReplyListRsp {
|
|
|
List []RepliesItem `json:"list"`
|
|
List []RepliesItem `json:"list"`
|
|
@@ -358,27 +351,27 @@ type (
|
|
|
Success bool `json:"success"`
|
|
Success bool `json:"success"`
|
|
|
}
|
|
}
|
|
|
GetUserPostListReq {
|
|
GetUserPostListReq {
|
|
|
- Page int64 `json:"page"`
|
|
|
|
|
- PageSize int64 `json:"page_size"`
|
|
|
|
|
- QueryUserId int64 `json:"query_user_id"`
|
|
|
|
|
|
|
+ Page int64 `from:"page,default=1"`
|
|
|
|
|
+ PageSize int64 `from:"page_size,default=10"`
|
|
|
|
|
+ QueryUserId int64 `from:"query_user_id"`
|
|
|
}
|
|
}
|
|
|
GetUserPostListRsp {
|
|
GetUserPostListRsp {
|
|
|
List []GetPostListItem `json:"list"`
|
|
List []GetPostListItem `json:"list"`
|
|
|
Total int64 `json:"total"`
|
|
Total int64 `json:"total"`
|
|
|
}
|
|
}
|
|
|
GetUserPostCollectionListReq {
|
|
GetUserPostCollectionListReq {
|
|
|
- Page int64 `json:"page"`
|
|
|
|
|
- PageSize int64 `json:"page_size"`
|
|
|
|
|
- QueryUserId int64 `json:"query_user_id"`
|
|
|
|
|
|
|
+ Page int64 `from:"page,default=1"`
|
|
|
|
|
+ PageSize int64 `from:"page_size,default=10"`
|
|
|
|
|
+ QueryUserId int64 `from:"query_user_id"`
|
|
|
}
|
|
}
|
|
|
GetUserPostCollectionListRsp {
|
|
GetUserPostCollectionListRsp {
|
|
|
List []GetPostListItem `json:"list"`
|
|
List []GetPostListItem `json:"list"`
|
|
|
Total int64 `json:"total"`
|
|
Total int64 `json:"total"`
|
|
|
}
|
|
}
|
|
|
GetUserPostLikeListReq {
|
|
GetUserPostLikeListReq {
|
|
|
- Page int64 `json:"page"`
|
|
|
|
|
- PageSize int64 `json:"page_size"`
|
|
|
|
|
- QueryUserId int64 `json:"query_user_id"`
|
|
|
|
|
|
|
+ Page int64 `from:"page,default=1"`
|
|
|
|
|
+ PageSize int64 `from:"page_size,default=10"`
|
|
|
|
|
+ QueryUserId int64 `from:"query_user_id"`
|
|
|
}
|
|
}
|
|
|
GetUserPostLikeListRsp {
|
|
GetUserPostLikeListRsp {
|
|
|
List []GetPostListItem `json:"list"`
|
|
List []GetPostListItem `json:"list"`
|
|
@@ -387,137 +380,147 @@ type (
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
@server (
|
|
@server (
|
|
|
- perfix: /v1
|
|
|
|
|
|
|
+ prefix: /v1/api
|
|
|
)
|
|
)
|
|
|
service slowwild {
|
|
service slowwild {
|
|
|
@doc "登录方法"
|
|
@doc "登录方法"
|
|
|
@handler login
|
|
@handler login
|
|
|
- post /api/user/login (LoginReq) returns (BaseReturnData)
|
|
|
|
|
|
|
+ post /user/login (LoginReq) returns (BaseReturnData)
|
|
|
|
|
|
|
|
@doc "用户注册"
|
|
@doc "用户注册"
|
|
|
@handler register
|
|
@handler register
|
|
|
- post /api/user/register (RegisterReq) returns (BaseReturnData)
|
|
|
|
|
|
|
+ post /user/register (RegisterReq) returns (BaseReturnData)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@server (
|
|
@server (
|
|
|
- perfix: /v1
|
|
|
|
|
|
|
+ prefix: /v1/api
|
|
|
jwt: Auth // 开启 jwt 认证
|
|
jwt: Auth // 开启 jwt 认证
|
|
|
)
|
|
)
|
|
|
service slowwild {
|
|
service slowwild {
|
|
|
@doc "获取用户信息"
|
|
@doc "获取用户信息"
|
|
|
@handler getUserInfo
|
|
@handler getUserInfo
|
|
|
- get /api/user/info (GetUserInfoReq) returns (BaseReturnData)
|
|
|
|
|
|
|
+ get /user/info (GetUserInfoReq) returns (BaseReturnData)
|
|
|
|
|
|
|
|
@doc "查询用户"
|
|
@doc "查询用户"
|
|
|
@handler findUser
|
|
@handler findUser
|
|
|
- post /api/user/find (FindUserReq) returns (BaseReturnData)
|
|
|
|
|
|
|
+ post /user/find (FindUserReq) returns (BaseReturnData)
|
|
|
|
|
|
|
|
@doc "关注用户"
|
|
@doc "关注用户"
|
|
|
@handler followUser
|
|
@handler followUser
|
|
|
- post /api/user/follow (FollowUserReq) returns (BaseReturnData)
|
|
|
|
|
|
|
+ post /user/follow (FollowUserReq) returns (BaseReturnData)
|
|
|
|
|
|
|
|
@doc "取消关注用户"
|
|
@doc "取消关注用户"
|
|
|
@handler unfollowUser
|
|
@handler unfollowUser
|
|
|
- post /api/user/unfollow (UnFollowUserReq) returns (BaseReturnData)
|
|
|
|
|
|
|
+ post /user/unfollow (UnFollowUserReq) returns (BaseReturnData)
|
|
|
|
|
|
|
|
@doc "获取粉丝"
|
|
@doc "获取粉丝"
|
|
|
@handler getFans
|
|
@handler getFans
|
|
|
- get /api/user/fans (GetFollowingReq) returns (BaseReturnData)
|
|
|
|
|
|
|
+ get /user/fans (GetFollowingReq) returns (BaseReturnData)
|
|
|
|
|
|
|
|
@doc "获取关注列表"
|
|
@doc "获取关注列表"
|
|
|
@handler getFollows
|
|
@handler getFollows
|
|
|
- get /api/user/follows (GetFollowReq) returns (BaseReturnData)
|
|
|
|
|
|
|
+ get /user/follows (GetFollowReq) returns (BaseReturnData)
|
|
|
|
|
|
|
|
@doc "获取用户信息"
|
|
@doc "获取用户信息"
|
|
|
@handler getUserProfile
|
|
@handler getUserProfile
|
|
|
- get /api/user/profile (GetUserProfileReq) returns (BaseReturnData)
|
|
|
|
|
|
|
+ get /user/profile (GetUserProfileReq) returns (BaseReturnData)
|
|
|
|
|
|
|
|
@doc "搜索用户"
|
|
@doc "搜索用户"
|
|
|
@handler searchUsername
|
|
@handler searchUsername
|
|
|
- get /api/user/search (SearchUsernameReq) returns (BaseReturnData)
|
|
|
|
|
|
|
+ get /user/search (SearchUsernameReq) returns (BaseReturnData)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@server (
|
|
@server (
|
|
|
- perfix: /v1
|
|
|
|
|
|
|
+ prefix: /v1/api
|
|
|
jwt: Auth
|
|
jwt: Auth
|
|
|
)
|
|
)
|
|
|
service slowwild {
|
|
service slowwild {
|
|
|
@doc "创建帖子"
|
|
@doc "创建帖子"
|
|
|
@handler createPost
|
|
@handler createPost
|
|
|
- post /api/post/create (CreatePostReq) returns (BaseReturnData)
|
|
|
|
|
|
|
+ post /post/create (CreatePostReq) returns (BaseReturnData)
|
|
|
|
|
|
|
|
@doc "帖子点赞"
|
|
@doc "帖子点赞"
|
|
|
@handler postUpvote
|
|
@handler postUpvote
|
|
|
- post /api/post/upvote (PostUpvoteReq) returns (BaseReturnData)
|
|
|
|
|
|
|
+ post /post/upvote (PostUpvoteReq) returns (BaseReturnData)
|
|
|
|
|
|
|
|
@doc "帖子收藏"
|
|
@doc "帖子收藏"
|
|
|
@handler postCollection
|
|
@handler postCollection
|
|
|
- post /api/post/collection (PostCollectionReq) returns (BaseReturnData)
|
|
|
|
|
|
|
+ post /post/collection (PostCollectionReq) returns (BaseReturnData)
|
|
|
|
|
|
|
|
@doc "帖子分享"
|
|
@doc "帖子分享"
|
|
|
@handler postShare
|
|
@handler postShare
|
|
|
- post /api/post/share (PostShareReq) returns (BaseReturnData)
|
|
|
|
|
|
|
+ post /post/share (PostShareReq) returns (BaseReturnData)
|
|
|
|
|
|
|
|
@doc "发布评论"
|
|
@doc "发布评论"
|
|
|
@handler postComment
|
|
@handler postComment
|
|
|
- post /api/post/comment (PostCommentReq) returns (BaseReturnData)
|
|
|
|
|
|
|
+ post /post/comment (PostCommentReq) returns (BaseReturnData)
|
|
|
|
|
|
|
|
@doc "回复评论"
|
|
@doc "回复评论"
|
|
|
@handler postReply
|
|
@handler postReply
|
|
|
- post /api/post/reply (PostReplyReq) returns (BaseReturnData)
|
|
|
|
|
|
|
+ post /post/reply (PostReplyReq) returns (BaseReturnData)
|
|
|
|
|
|
|
|
@doc "评论点赞"
|
|
@doc "评论点赞"
|
|
|
@handler postCommentUpvote
|
|
@handler postCommentUpvote
|
|
|
- post /api/post/comment/upvote (PostCommentUpvoteReq) returns (BaseReturnData)
|
|
|
|
|
|
|
+ post /post/comment/upvote (PostCommentUpvoteReq) returns (BaseReturnData)
|
|
|
|
|
|
|
|
@doc "帖子删除"
|
|
@doc "帖子删除"
|
|
|
@handler postDelete
|
|
@handler postDelete
|
|
|
- post /api/post/delete (PostDeleteReq) returns (BaseReturnData)
|
|
|
|
|
|
|
+ post /post/delete (PostDeleteReq) returns (BaseReturnData)
|
|
|
|
|
|
|
|
@doc "评论删除"
|
|
@doc "评论删除"
|
|
|
@handler commentDelete
|
|
@handler commentDelete
|
|
|
- post /api/comment/delete (CommentDeleteReq) returns (BaseReturnData)
|
|
|
|
|
|
|
+ post /comment/delete (CommentDeleteReq) returns (BaseReturnData)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@server (
|
|
@server (
|
|
|
- perfix: /v1
|
|
|
|
|
|
|
+ prefix: /v1/api
|
|
|
middleware: OptionalJwtMiddleware
|
|
middleware: OptionalJwtMiddleware
|
|
|
)
|
|
)
|
|
|
service slowwild {
|
|
service slowwild {
|
|
|
@doc "获取话题列表"
|
|
@doc "获取话题列表"
|
|
|
@handler getTagList
|
|
@handler getTagList
|
|
|
- get /api/tag/list (GetTagListReq) returns (BaseReturnData)
|
|
|
|
|
|
|
+ get /tag/list (GetTagListReq) returns (BaseReturnData)
|
|
|
|
|
|
|
|
@doc "获取话题详情"
|
|
@doc "获取话题详情"
|
|
|
@handler getTag
|
|
@handler getTag
|
|
|
- get /api/tag (GetTagReq) returns (BaseReturnData)
|
|
|
|
|
|
|
+ get /tag (GetTagReq) returns (BaseReturnData)
|
|
|
|
|
|
|
|
@doc "获取帖子列表"
|
|
@doc "获取帖子列表"
|
|
|
@handler getPostList
|
|
@handler getPostList
|
|
|
- get /api/post/list (GetPostListReq) returns (BaseReturnData)
|
|
|
|
|
|
|
+ get /post/list (GetPostListReq) returns (BaseReturnData)
|
|
|
|
|
|
|
|
@doc "获取帖子详情"
|
|
@doc "获取帖子详情"
|
|
|
@handler getPost
|
|
@handler getPost
|
|
|
- get /api/post (GetPostReq) returns (BaseReturnData)
|
|
|
|
|
|
|
+ get /post (GetPostReq) returns (BaseReturnData)
|
|
|
|
|
|
|
|
@doc "获取评论列表"
|
|
@doc "获取评论列表"
|
|
|
@handler getPostCommentList
|
|
@handler getPostCommentList
|
|
|
- get /api/post/comment/list (GetPostCommentListReq) returns (BaseReturnData)
|
|
|
|
|
|
|
+ get /post/comment/list (GetPostCommentListReq) returns (BaseReturnData)
|
|
|
|
|
|
|
|
@doc "获取回复列表"
|
|
@doc "获取回复列表"
|
|
|
@handler getReplyList
|
|
@handler getReplyList
|
|
|
- get /api/post/reply/list (GetReplyListReq) returns (BaseReturnData)
|
|
|
|
|
|
|
+ get /post/reply/list (GetReplyListReq) returns (BaseReturnData)
|
|
|
|
|
|
|
|
@doc "获取用户发布的帖子列表"
|
|
@doc "获取用户发布的帖子列表"
|
|
|
@handler getUserPostList
|
|
@handler getUserPostList
|
|
|
- get /api/user/post/list (GetUserPostListReq) returns (BaseReturnData)
|
|
|
|
|
|
|
+ get /user/post/list (GetUserPostListReq) returns (BaseReturnData)
|
|
|
|
|
|
|
|
@doc "获取用户收藏的帖子列表"
|
|
@doc "获取用户收藏的帖子列表"
|
|
|
@handler getUserPostCollectionList
|
|
@handler getUserPostCollectionList
|
|
|
- get /api/user/post/collection/list (GetUserPostCollectionListReq) returns (BaseReturnData)
|
|
|
|
|
|
|
+ get /user/post/collection/list (GetUserPostCollectionListReq) returns (BaseReturnData)
|
|
|
|
|
|
|
|
@doc "获取用户点赞的帖子列表"
|
|
@doc "获取用户点赞的帖子列表"
|
|
|
@handler getUserPostLikeList
|
|
@handler getUserPostLikeList
|
|
|
- get /api/user/post/like/list (GetUserPostLikeListReq) returns (BaseReturnData)
|
|
|
|
|
|
|
+ get /user/post/like/list (GetUserPostLikeListReq) returns (BaseReturnData)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+@server (
|
|
|
|
|
+ prefix: /v1/api
|
|
|
|
|
+ jwt: Auth
|
|
|
|
|
+)
|
|
|
|
|
+service slowwild {
|
|
|
|
|
+ @doc "上传文件"
|
|
|
|
|
+ @handler attachmentUpload
|
|
|
|
|
+ post /attachment/upload returns (BaseReturnData)
|
|
|
}
|
|
}
|
|
|
|
|
|