7
0
gaore-common-sdk-go/services/stat/client.go

123 lines
3.0 KiB
Go
Raw Permalink Normal View History

2024-09-06 17:59:18 +08:00
package stat
import (
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk"
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
"time"
2024-09-06 17:59:18 +08:00
)
const (
VERSION = "2020-11-16"
)
var HOST = requests.Host{
Default: "stat",
}
type Client struct {
sdk.Client
}
func NewClient() (client *Client, err error) {
client = new(Client)
err = client.Init()
return
}
// SyncGameServerList 同步开服数据
func (c *Client) SyncGameServerList(req *SyncGameServerListReq) (resp *SyncGameServerListResp, err error) {
resp = CreateSyncGameServerListResp()
err = c.DoAction(req, resp)
if err != nil {
return
}
return
}
2024-09-19 12:33:23 +08:00
func (c *Client) SetUserNewGameAuth(req *SetUserNewGameAuthReq) (resp *SetUserNewGameAuthResp, err error) {
resp = CreateSetUserNewGameAuthResp()
err = c.DoAction(req, resp)
return
}
// GetAgentList 获取推广渠道列表
func (c *Client) GetAgentList(req *GetAgentListReq) (resp *GetAgentListResp, err error) {
resp = CreateGetAgentListResp()
err = c.DoAction(req, resp)
if err != nil {
return
}
return
}
// GetUserRoleRegPage 获取用户角色注册分页列表
func (c *Client) GetUserRoleRegPage(req *UserRoleRegReq) (resp *UserRoleRegResp, err error) {
resp = CreateUserRoleRegPageResp()
// 设置超时时间
req.SetConnectTimeout(10 * time.Second)
// 设置读取超时时间
req.SetReadTimeout(20 * time.Second)
err = c.DoAction(req, resp)
if err != nil {
return
}
return
}
2025-09-05 10:25:50 +08:00
// GetAnchorBySiteId 通过site_id获取达人信息
func (c *Client) GetAnchorBySiteId(req *GetAnchorBySiteId) (resp *GetAnchorBySiteIdResp, err error) {
resp = &GetAnchorBySiteIdResp{
BaseResponse: &responses.BaseResponse{},
}
err = c.DoAction(req, resp)
return
}
2025-09-05 10:25:50 +08:00
// GetUserTotalPay 获取用户累计付费
func (c *Client) GetUserTotalPay(req *GetUserTotalPayReq) (resp *GetUserTotalPayResp, err error) {
resp = CreateGetUserTotalPayResp()
err = c.DoAction(req, resp)
if err != nil {
return
}
return
}
2025-10-15 15:26:09 +08:00
// GetGameServerCountData 获取区服统计数据
func (c *Client) GetGameServerCountData(req *GetGameServerCountDataReq) (resp *GetGameServerCountDataResp, err error) {
resp = CreateGetGameServerCountDataResp()
err = c.DoAction(req, resp)
if err != nil {
return
}
return
}
// GetAnchorByLiveCode 通过口令获取达人信息
func (c *Client) GetAnchorByLiveCode(req *GetAnchorByLiveCodeReq) (resp *GetAnchorByLiveCodeResp, err error) {
resp = &GetAnchorByLiveCodeResp{
BaseResponse: &responses.BaseResponse{},
}
err = c.DoAction(req, resp)
return
}
// GetLiveCode 根据口令获取口令信息
func (c *Client) GetLiveCode(req *GetLiveCodeReq) (resp *GetLiveCodeResp, err error) {
resp = &GetLiveCodeResp{
BaseResponse: &responses.BaseResponse{},
}
err = c.DoAction(req, resp)
return
}
func (c *Client) BindLiveCode(req *BindLiveCodeReq) (resp *BindLiveCodeResp, err error) {
resp = &BindLiveCodeResp{
BaseResponse: &responses.BaseResponse{},
}
err = c.DoAction(req, resp)
return
}