You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
paopao-ce/mirc/web/v1/loose.go

30 lines
728 B

package v1
import (
. "github.com/alimy/mir/v4"
. "github.com/alimy/mir/v4/engine"
"github.com/rocboss/paopao-ce/internal/model/web"
)
func init() {
Entry[Loose]()
}
// Loose 宽松授权的服务
type Loose struct {
Chain `mir:"-"`
Group `mir:"v1"`
// Timeline 获取广场流
Timeline func(Get, web.TimelineReq) web.TimelineResp `mir:"/posts"`
// GetUserTweets 获取用户动态列表
GetUserTweets func(Get, web.GetUserTweetsReq) web.GetUserTweetsResp `mir:"/user/posts"`
// TopicList 获取话题列表
TopicList func(Get, web.TopicListReq) web.TopicListResp `mir:"/tags"`
// TweetComments 获取动态评论
TweetComments func(Get, web.TweetCommentsReq) web.TweetCommentsResp `mir:"/post/comments"`
}