44 lines
1.1 KiB
Plaintext
Executable File
44 lines
1.1 KiB
Plaintext
Executable File
syntax = "v1"
|
|
|
|
import "git.ixiaochuan.cn/zeus/xczero_util/common/xcproto"
|
|
|
|
import "git.ixiaochuan.cn/pp_server/service_v2/mtypes"
|
|
|
|
info(
|
|
desc: "帖子服务"
|
|
)
|
|
|
|
type (
|
|
WebPageStExt {
|
|
mtypes.WebPageSt
|
|
Mp3Url *string `json:"mp3_url,omitempty" bson:"mp3_url,omitempty" msgpack:"mp3_url,omitempty"`
|
|
}
|
|
PostStExtWithOriginVote {
|
|
mtypes.PostSt
|
|
WebPage *WebPageStExt `json:"webpage,omitempty" bson:"webpage,omitempty" msgpack:"webpage,omitempty"`
|
|
Videos map[string]*xcproto.VideoSt `json:"videos,omitempty" bson:"videos,omitempty" msgpack:"videos,omitempty"`
|
|
}
|
|
)
|
|
|
|
type (
|
|
PostGetPostByPidsParam {
|
|
Pids []int64 `json:"pids,omitempty"`
|
|
Ip *string `json:"ip,omitempty"`
|
|
Exts map[string]string `json:"exts,omitempty"`
|
|
}
|
|
PostGetPostByPidsData {
|
|
List map[int64]*PostStExtWithOriginVote `json:"list"`
|
|
}
|
|
)
|
|
|
|
@server(
|
|
prefix: /post/httpapi
|
|
)
|
|
service post {
|
|
@handler GetPostByPidsHandler
|
|
post /get_post_by_pids,/op_get_post_by_pids (PostGetPostByPidsParam) returns (PostGetPostByPidsData)
|
|
}
|
|
|
|
|
|
1. GetPostByPids
|
|
2. GetPostByPidsV2 |