refactor(game): 重构游戏版本获取接口
- 将 GetGameByVersionReq 重命名为 GetGameVersionReq - 将 GetGameByVersionResp 重命名为 GetGameVersionResp - 更新了相关的函数和结构体名称,以提高代码的一致性和可读性
This commit is contained in:
parent
25552dd187
commit
7e9eae718c
@ -83,7 +83,7 @@ func (c *Client) GetIsBlockOutIos(req *IsBlockOutIosReq) (resp *IsBlockOutIosRes
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) GetGameByVersion(req *GetGameByVersionReq) (resp *GetGameByVersionResp, err error) {
|
func (c *Client) GetGameByVersion(req *GetGameVersionReq) (resp *GetGameVersionResp, err error) {
|
||||||
resp = CreateGetGameByVersionResp()
|
resp = CreateGetGameByVersionResp()
|
||||||
err = c.DoAction(req, resp)
|
err = c.DoAction(req, resp)
|
||||||
return
|
return
|
||||||
|
@ -260,21 +260,21 @@ func CreateGetGameCompanyResp() *GetGameCompanyResp {
|
|||||||
|
|
||||||
// ==== 获取游戏客户端版本配置
|
// ==== 获取游戏客户端版本配置
|
||||||
|
|
||||||
type GetGameByVersionReq struct {
|
type GetGameVersionReq struct {
|
||||||
*requests.RpcRequest
|
*requests.RpcRequest
|
||||||
GameId int `position:"Body" field:"game_id"`
|
GameId int `position:"Body" field:"game_id"`
|
||||||
GameVersion string `position:"Body" field:"game_version"`
|
GameVersion string `position:"Body" field:"game_version"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetGameByVersionResp struct {
|
type GetGameVersionResp struct {
|
||||||
*responses.BaseResponse
|
*responses.BaseResponse
|
||||||
Code int `json:"code"`
|
Code int `json:"code"`
|
||||||
Msg string `json:"msg"`
|
Msg string `json:"msg"`
|
||||||
Data GameVersionInfo `json:"data"`
|
Data GameVersionInfo `json:"data"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func CreateGetGameByVersionReq(gameId int, gameVersion string) *GetGameByVersionReq {
|
func CreateGetGameByVersionReq(gameId int, gameVersion string) *GetGameVersionReq {
|
||||||
req := &GetGameByVersionReq{
|
req := &GetGameVersionReq{
|
||||||
RpcRequest: &requests.RpcRequest{},
|
RpcRequest: &requests.RpcRequest{},
|
||||||
}
|
}
|
||||||
req.GameId = gameId
|
req.GameId = gameId
|
||||||
@ -284,8 +284,8 @@ func CreateGetGameByVersionReq(gameId int, gameVersion string) *GetGameByVersion
|
|||||||
return req
|
return req
|
||||||
}
|
}
|
||||||
|
|
||||||
func CreateGetGameByVersionResp() *GetGameByVersionResp {
|
func CreateGetGameByVersionResp() *GetGameVersionResp {
|
||||||
return &GetGameByVersionResp{
|
return &GetGameVersionResp{
|
||||||
BaseResponse: &responses.BaseResponse{},
|
BaseResponse: &responses.BaseResponse{},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user