feat(game): 新增获取游戏扩展信息接口
This commit is contained in:
parent
bc79297cea
commit
a34bb1c45e
@ -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
|
||||
}
|
||||
|
||||
@ -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)
|
||||
}
|
||||
|
||||
@ -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{},
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user