diff --git a/services/game/client.go b/services/game/client.go index a70c953..c86f124 100644 --- a/services/game/client.go +++ b/services/game/client.go @@ -170,3 +170,10 @@ func (c *Client) GetSdkTheme(req *GetSdkThemeReq) (response *GetSdkThemeResp, er err = c.DoAction(req, response) return } + +// GetGameListExtInfo 获取游戏扩展信息 +func (c *Client) GetGameListExtInfo(req *GetGameListExtInfoReq) (response *GetGameListExtInfoResp, err error) { + response = CreateGetGameListExtInfoResp() + err = c.DoAction(req, response) + return +} diff --git a/services/game/client_test.go b/services/game/client_test.go index 611840f..f9811f9 100644 --- a/services/game/client_test.go +++ b/services/game/client_test.go @@ -286,3 +286,18 @@ func TestGetSdkTheme(t *testing.T) { fmt.Println(sdkTheme.Status, sdkTheme.Code, sdkTheme.Msg) fmt.Println(sdkTheme.Data) } + +func TestGetGameListExtInfo(t *testing.T) { + client, err := NewClient() + if err != nil { + t.Error(err) + } + req := CreateGetGameListExtInfoReq(7680) + gameListExtInfo, err := client.GetGameListExtInfo(req) + if err != nil { + t.Error(err) + return + } + fmt.Println(gameListExtInfo.Status, gameListExtInfo.Code, gameListExtInfo.Msg) + fmt.Printf("%+v\n", gameListExtInfo.Data) +} diff --git a/services/game/game.go b/services/game/game.go index 5221c54..89c5788 100644 --- a/services/game/game.go +++ b/services/game/game.go @@ -622,3 +622,41 @@ func CreateGetSdkThemeResp() *GetSdkThemeResp { BaseResponse: &responses.BaseResponse{}, } } + +type GetGameListExtInfoReq struct { + *requests.RpcRequest + GameId int64 `position:"Query" field:"game_id" default:"-" ` +} + +type ExtInfo struct { + GameId int64 `json:"game_id"` + GetRoleUrl string `json:"get_role_url"` + OfflinePayUrl string `json:"offline_pay_url"` + DistributionPlatformParam string `json:"distribution_platform_param"` + Material string `json:"material"` + CpWithdrawCallPro string `json:"cp_withdraw_call_pro"` + CpWithdrawCallTest string `json:"cp_withdraw_call_test"` +} + +type GetGameListExtInfoResp struct { + *responses.BaseResponse + Code int `json:"code"` + Msg string `json:"msg"` + Data ExtInfo `json:"data"` +} + +func CreateGetGameListExtInfoReq(gameId int64) *GetGameListExtInfoReq { + req := &GetGameListExtInfoReq{ + RpcRequest: &requests.RpcRequest{}, + GameId: gameId, + } + req.InitWithApiInfo(HOST, VERSION, "/api/game/getGameListExtInfo") + req.Method = requests.GET + return req +} + +func CreateGetGameListExtInfoResp() *GetGameListExtInfoResp { + return &GetGameListExtInfoResp{ + BaseResponse: &responses.BaseResponse{}, + } +}