112 lines
2.9 KiB
Go
112 lines
2.9 KiB
Go
package game
|
|
|
|
import (
|
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk"
|
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
|
)
|
|
|
|
const (
|
|
VERSION = "2025-05-28"
|
|
)
|
|
|
|
var HOST = requests.Host{
|
|
Default: "game",
|
|
}
|
|
|
|
type Client struct {
|
|
sdk.Client
|
|
}
|
|
|
|
func NewClient() (client *Client, err error) {
|
|
client = new(Client)
|
|
err = client.Init()
|
|
return
|
|
}
|
|
|
|
// GetGameOsInfo 获取游戏系统信息
|
|
func (c *Client) GetGameOsInfo(req *GetGameOsInfoReq) (resp *GetGameOsInfoResp, err error) {
|
|
resp = CreateGetGameOsInfoResp()
|
|
err = c.DoAction(req, resp)
|
|
return
|
|
}
|
|
|
|
// GetGameInfo 获取游戏信息
|
|
func (c *Client) GetGameInfo(req *GetGameInfoReq) (resp *GetGameInfoResp, err error) {
|
|
resp = CreateGetGameInfoByIdResp()
|
|
err = c.DoAction(req, resp)
|
|
return
|
|
}
|
|
|
|
func (c *Client) GetChannelInfo(req *ChannelInfoReq) (resp *ChannelInfoResp, err error) {
|
|
resp = CreateChannelInfoResp()
|
|
err = c.DoAction(req, resp)
|
|
return
|
|
}
|
|
|
|
func (c *Client) GetLoginInfoById(req *GetLoginInfoByIdReq) (resp *GetLoginInfoByIdResp, err error) {
|
|
resp = CreateGetLoginInfoByIdResp()
|
|
err = c.DoAction(req, resp)
|
|
return
|
|
}
|
|
|
|
func (c *Client) GetProtocolByGameId(req *GetProtocolByGameIdRep) (resp *GetProtocolByGameIdResp, err error) {
|
|
resp = CreateGetProtocolByGameIdResp()
|
|
err = c.DoAction(req, resp)
|
|
return
|
|
}
|
|
|
|
// GetGameSimpleList 获取子游戏简单列表
|
|
func (c *Client) GetGameSimpleList(req *GetGameSimpleListReq) (resp *GetGameSimpleListResp, err error) {
|
|
resp = CreateGetGameSimpleListResp()
|
|
err = c.DoAction(req, resp)
|
|
return
|
|
}
|
|
|
|
// GetGameServerV2 获取游戏服务器列表v2
|
|
func (c *Client) GetGameServerV2(req *GetServerV2Request) (resp *GetServerV2Response, err error) {
|
|
resp = CreateGetServerV2Response()
|
|
err = c.DoAction(req, resp)
|
|
return
|
|
}
|
|
|
|
// GetGameCompany 获取单个根游戏信息
|
|
func (c *Client) GetGameCompany(req *GetGameCompanyReq) (resp *GetGameCompanyResp, err error) {
|
|
resp = CreateGetGameCompanyResp()
|
|
err = c.DoAction(req, resp)
|
|
return
|
|
}
|
|
|
|
// GetIsBlockOutIos 获取iOS切支付规则
|
|
func (c *Client) GetIsBlockOutIos(req *IsBlockOutIosReq) (resp *IsBlockOutIosResp, err error) {
|
|
resp = CreateIsBlockOutIosResp()
|
|
err = c.DoAction(req, resp)
|
|
return
|
|
}
|
|
|
|
func (c *Client) GetGameVersion(req *GetGameVersionReq) (resp *GetGameVersionResp, err error) {
|
|
resp = CreateGetGameVersionResp()
|
|
err = c.DoAction(req, resp)
|
|
return
|
|
}
|
|
|
|
// GetConfig 获取游戏全局配置
|
|
func (c *Client) GetConfig(req *GetConfigReq) (resp *GetConfigResp, err error) {
|
|
resp = CreateGetConfigResp()
|
|
err = c.DoAction(req, resp)
|
|
return
|
|
}
|
|
|
|
// GetRealAuthBlackList 获取实名黑名单
|
|
func (c *Client) GetRealAuthBlackList(req *GetRealAuthBlackListReq) (resp *GetRealAuthBlackListResp, err error) {
|
|
resp = CreateGetRealAuthBlackListResp()
|
|
err = c.DoAction(req, resp)
|
|
return
|
|
}
|
|
|
|
// GetGameRealAuthInfo 获取实名参数
|
|
func (c *Client) GetGameRealAuthInfo(req *GetGameRealAuthInfoReq) (resp *GetGameRealAuthInfoResp, err error) {
|
|
resp = CreateGetGameRealAuthInfoResp()
|
|
err = c.DoAction(req, resp)
|
|
return
|
|
}
|