创建同步到游戏中心请求优化
This commit is contained in:
parent
4a8d29f57f
commit
3c00a77149
@ -2,13 +2,13 @@ package script
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
|
||||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
||||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
|
||||||
)
|
)
|
||||||
|
|
||||||
type OpenGameReq struct {
|
type OpenGameReq struct {
|
||||||
*requests.RpcRequest
|
*requests.RpcRequest
|
||||||
|
GameID int `position:"Query" field:"game_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type OpenGameResp struct {
|
type OpenGameResp struct {
|
||||||
@ -25,10 +25,11 @@ func (baseResponse *OpenGameResp) GetHttpContentBytes() []byte {
|
|||||||
func CreateOpenGameReq(gameId int) *OpenGameReq {
|
func CreateOpenGameReq(gameId int) *OpenGameReq {
|
||||||
req := &OpenGameReq{
|
req := &OpenGameReq{
|
||||||
&requests.RpcRequest{},
|
&requests.RpcRequest{},
|
||||||
|
gameId,
|
||||||
}
|
}
|
||||||
|
|
||||||
req.InitWithApiInfo(HOST, VERSION, "open_game.php?game_id="+fmt.Sprintf("%v", gameId))
|
req.InitWithApiInfo(HOST, VERSION, "open_game.php")
|
||||||
req.Method = requests.POST
|
req.Method = requests.GET
|
||||||
|
|
||||||
return req
|
return req
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user