Role of demo platform integration is allow third party web sites to play demo games from their pages. For game demo platform integration follow next simple steps:
[gameId]
) form game list (need
credentials).
[platform]
) form desktop
, mobile
or
mini
.
[gameServerUrl]
and [gameJsLibUrl]
.curl http://user:passwd@host/demo/game.json?gameId=[gameId]&gamePlatform=[platform]PHP HTTP basic auth documentation and examples: php curl, php pear
[gameServerUrl]
and [gameJsLibUrl]
by the ones obtained as a result of previous calling init game service.<gcw-game gcw-server-url="[gameServerUrl]"></gcw-game> <script src="[gameJsLibUrl]" type="text/javascript" charset="utf-8"></script> <script> gcw.gameElementsInit(); </script>Game client HTML code snippet with custom game event listener:
<gcw-game gcw-server-url="[gameServerUrl]"></gcw-game> <script src="[gameJsLibUrl]" type="text/javascript" charset="utf-8"></script> <script> gcw.gameElementsInit(gameEventListener); function gameEventListener(type, data) { console.log("Game event: " + type, data); if (type == gcw.api.GameEventType.HOME) { window.history.back(); } } </script>
curl http://user:passwd@host/demo/game.json?gameId=[gameId]&gamePlatform=[platform]&brand=[externalCasinoId]