创建同步到游戏中心请求优化
This commit is contained in:
		
							parent
							
								
									4a8d29f57f
								
							
						
					
					
						commit
						631959c0ec
					
				@ -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
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user