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"
|
2025-11-19 09:52:20 +08:00
|
|
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
|
2025-06-25 17:11:15 +08:00
|
|
|
"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
|
|
|
|
|
}
|
2025-04-01 15:42:36 +08:00
|
|
|
|
|
|
|
|
// GetAgentList 获取推广渠道列表
|
|
|
|
|
func (c *Client) GetAgentList(req *GetAgentListReq) (resp *GetAgentListResp, err error) {
|
|
|
|
|
resp = CreateGetAgentListResp()
|
|
|
|
|
err = c.DoAction(req, resp)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
return
|
|
|
|
|
}
|
2025-06-23 17:19:50 +08:00
|
|
|
|
|
|
|
|
// GetUserRoleRegPage 获取用户角色注册分页列表
|
|
|
|
|
func (c *Client) GetUserRoleRegPage(req *UserRoleRegReq) (resp *UserRoleRegResp, err error) {
|
|
|
|
|
resp = CreateUserRoleRegPageResp()
|
2025-06-25 17:11:15 +08:00
|
|
|
// 设置超时时间
|
|
|
|
|
req.SetConnectTimeout(10 * time.Second)
|
|
|
|
|
// 设置读取超时时间
|
|
|
|
|
req.SetReadTimeout(20 * time.Second)
|
2025-06-23 17:19:50 +08:00
|
|
|
err = c.DoAction(req, resp)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
return
|
|
|
|
|
}
|
2025-09-05 10:25:50 +08:00
|
|
|
|
2025-11-19 09:52:20 +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
|
|
|
|
|
}
|
2025-11-19 12:26:04 +08:00
|
|
|
|
2025-11-19 14:45:03 +08:00
|
|
|
// GetAnchorByLiveCode 通过口令获取达人信息
|
2025-11-19 12:26:04 +08:00
|
|
|
func (c *Client) GetAnchorByLiveCode(req *GetAnchorByLiveCodeReq) (resp *GetAnchorByLiveCodeResp, err error) {
|
|
|
|
|
resp = &GetAnchorByLiveCodeResp{
|
|
|
|
|
BaseResponse: &responses.BaseResponse{},
|
|
|
|
|
}
|
|
|
|
|
err = c.DoAction(req, resp)
|
|
|
|
|
return
|
|
|
|
|
}
|
2025-11-19 14:45:03 +08:00
|
|
|
|
|
|
|
|
// GetLiveCode 根据口令获取口令信息
|
|
|
|
|
func (c *Client) GetLiveCode(req *GetLiveCodeReq) (resp *GetLiveCodeResp, err error) {
|
|
|
|
|
resp = &GetLiveCodeResp{
|
|
|
|
|
BaseResponse: &responses.BaseResponse{},
|
|
|
|
|
}
|
|
|
|
|
err = c.DoAction(req, resp)
|
|
|
|
|
return
|
|
|
|
|
}
|
2025-11-20 14:20:39 +08:00
|
|
|
|
|
|
|
|
func (c *Client) BindLiveCode(req *BindLiveCodeReq) (resp *BindLiveCodeResp, err error) {
|
|
|
|
|
resp = &BindLiveCodeResp{
|
|
|
|
|
BaseResponse: &responses.BaseResponse{},
|
|
|
|
|
}
|
|
|
|
|
err = c.DoAction(req, resp)
|
|
|
|
|
return
|
|
|
|
|
}
|