package game import ( "fmt" "testing" ) func TestGetGameOsInfo(t *testing.T) { client, err := NewClient() if err != nil { panic(err) } req := CreateGetGameOsInfoReq() resp, err := client.GetGameOsInfo(req) if err != nil { panic(err) } fmt.Println(resp.Code, resp.Msg, resp.Data.OsList, resp.Data.OsRelList2) } func TestGetGameInfo(t *testing.T) { client, err := NewClient() if err != nil { panic(err) } resp, err := client.GetGameInfo(CreateGetGameInfoByIdReq(8362, 1)) if err != nil { panic(err) } fmt.Println(resp.Code, resp.Msg, resp.Data) } func TestChannelInfo(t *testing.T) { client, err := NewClient() if err != nil { panic(err) } req := CreateChannelInfoReq() req.ChannelKey = "GRSDK" resp, err := client.GetChannelInfo(req) if err != nil { panic(err) } fmt.Println(resp) } func TestLoginInfoById(t *testing.T) { client, err := NewClient() if err != nil { panic(err) } req := CreateGetLoginInfoByIdReq(7349, "1.0.0") info, err := client.GetLoginInfoById(req) if err != nil { t.Error(err) return } fmt.Println(info) } func TestGetProtocolByGameId(t *testing.T) { client, err := NewClient() if err != nil { panic(err) } req := CreateGetProtocolByGameIdRep() req.GameId = 8088 req.GameVersion = "1.1.0" req.Type = 1 info, err := client.GetProtocolByGameId(req) if err != nil { t.Error(err) return } fmt.Println(info) }