diff --git a/services/script/script.go b/services/script/script.go index 30287f7..9390924 100644 --- a/services/script/script.go +++ b/services/script/script.go @@ -2,13 +2,13 @@ package script import ( "encoding/json" - "fmt" "golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests" "golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses" ) type OpenGameReq struct { *requests.RpcRequest + GameID int `position:"Query" field:"game_id"` } type OpenGameResp struct { @@ -25,10 +25,11 @@ func (baseResponse *OpenGameResp) GetHttpContentBytes() []byte { func CreateOpenGameReq(gameId int) *OpenGameReq { req := &OpenGameReq{ &requests.RpcRequest{}, + gameId, } - req.InitWithApiInfo(HOST, VERSION, "open_game.php?game_id="+fmt.Sprintf("%v", gameId)) - req.Method = requests.POST + req.InitWithApiInfo(HOST, VERSION, "open_game.php") + req.Method = requests.GET return req }