3.12 Demo Launch Game (取得试玩进入游戏网址)

Notice (注意事项)

  • Bets and results are excluded from all report APIs.
    注单与结果不会出现在任何报表 API。

Description (说明)

This API call is used to launch a specific game in demo mode.
本功能用于开启指定游戏的试玩模式。

URL (网址)

https://{host}/api/demo_launch_game

Request Method

POST

Request Parameters (请求参数)

Field
(栏位)
Type
(型态)
Required
(必要)
Description
(说明)
agentIdStringYAgent ID <= 50 characters
代理帐号
gameTypeStringYGame Type <= 10 characters
游戏类型

Please refer to 5.1 Game for details.
详情请参考 5.1 游戏
gameCodeStringYGame Code <= 20 characters
游戏代码

Please refer to 5.1 Game for details.
详情请参考 5.1 游戏
langStringNLanguage fixed 2 characters
语言

default: EN
预设: EN

Please refer to 5.3 Languages for details.
详情请参考 5.3 语言
soundBooleanNEnable Sound
启用声音

default: true
预设: true
homePageUrlStringNSpecify the url to return to the operator's home page. <= 3000 characters
指定返回营运商主页的 URL

need to set http:// or https://
需要设置 http:// or https://
{
  "agentId": "hrgag",
  "gameType": "LIVE",
  "gameCode": "BACCARAT",
  "lang": "EN",
  "sound": true,
  "homePageUrl": "https://www.google.com/"
}

Return Result (返回结果)

Field
(栏位)
Type
(型态)
Description
(说明)
codeStringStatus Code fixed 4 characters
状态码

Please refer to 5.4 Status Code for details.
详情请参考 5.4 状态代码
dataObject
urlStringGame URL
游戏链结
{
  "code": "0000",
  "data": {
    "url": "https://{gamepage}/?lang=EN&sound=true&gameType=LIVE&gameCode=BACCARAT&isTopWindowRedirect=Y&x=Q2cA1qPvyUo26TzfM_dUgWTV5wDQ1gbAt8AgyEYgFAfOO1iopp1DEEwppfwW92akPCbsbp-Cmk95KXGiNEntz1nG2aRUcGnfex4UlCBTWdhhXchsyws5B1Xwt4QeP10d1t6JCqE77peH5IyHcdu41w=="
  }
}

Sample Request For Each Language (各语言请求范例)

SimpleDateFormat xtsFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
xtsFormat.setTimeZone(TimeZone.getTimeZone("GMT+8"));
String xts = xtsFormat.format(new Date());

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"agentId\":\"hrgag\",\"gameType\":\"LIVE\",\"gameCode\":\"BACCARAT\",\"lang\":\"EN\",\"sound\":true,\"homePageUrl\":\"https://www.google.com/\"}");
Request request = new Request.Builder()
  .url("https://{host}/api/demo_launch_game")
  .method("POST", body)
  .addHeader("Authorization", "Basic dGVzdDp0ZXN0")
  .addHeader("xts", xts)
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();