feat: migrate all remaining modules from rainyun-go-sdk
- domain(24), product(8), rbm(10), rca(21), rgs(38), ros(19), ssl(5), user(10), workorder(11), public remaining 5 - split nested response structs into reusable named types - rgs reuses rcs request/response types - fix source bugs: malformed paths, resp vs &resp, missing bodies - register all 11 services in sdk.New
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package public
|
||||
|
||||
import "github.com/XingfenD/rainyun_api_go_sdk/constant"
|
||||
|
||||
// https://api.rainyun.com/#/paths/product~1rgs~1egg/get
|
||||
|
||||
// 获取蛋(游戏)列表
|
||||
type GetEggListResponse struct {
|
||||
Code int `json:"code"`
|
||||
Data []EggItem `json:"data"`
|
||||
}
|
||||
|
||||
type EggItem struct {
|
||||
Name string `json:"name"` // 名称
|
||||
EggGroup string `json:"egg_group"` // 分组
|
||||
Title string `json:"title"` // 标题
|
||||
Desc string `json:"desc"` // 描述
|
||||
IconURL string `json:"icon_url"` // 图标
|
||||
Order int `json:"order"` // 排序
|
||||
IsHidden bool `json:"is_hidden"` // 是否隐藏
|
||||
SaveDirs []string `json:"save_dirs"` // 重装时建议的需要保留的目录
|
||||
}
|
||||
|
||||
func (s *PublicService) GetEggList() (*GetEggListResponse, error) {
|
||||
path := "/product/rgs/egg"
|
||||
|
||||
var resp GetEggListResponse
|
||||
err := s.client.Do(constant.HTTPMethod_GET, path, nil, nil, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
Reference in New Issue
Block a user