feat: 头条,微博热搜等函数 API 实现

This commit is contained in:
RockYang
2023-07-25 15:02:43 +08:00
parent ca8c8e6490
commit cab955c292
15 changed files with 251 additions and 161 deletions

View File

@@ -1,11 +1,24 @@
package function
import "chatplus/core/types"
type Function interface {
Invoke(...interface{}) (string, error)
Name() string
}
type resVo struct {
Code int `json:"code"`
Msg string `json:"msg"`
Code types.BizCode `json:"code"`
Message string `json:"message"`
Data struct {
Title string `json:"title"`
UpdatedAt string `json:"updated_at"`
Items []dataItem `json:"items"`
} `json:"data"`
}
type dataItem struct {
Title string `json:"title"`
Url string `json:"url"`
Remark string `json:"remark"`
}