1.2 getGame() *

Retrieves the desired game embed url for the gameId provided.

public getGame( int $gameid [, string $lang = string(2) "en" , string $play_for_fun = bool FALSE ] )

Parameters

  • int$gameidrequired - GameId you recieve from getGameList()
  • string$lang= string(2) "en" - Lang 2 char language string, for example 'en' or 'cn', not all languages are supported
  • string$play_for_fun= bool FALSE - Play_for_fun open game in play for fun mode
  • string $homeurl - home/back button

Return Values

  • string - Containing the embed url
NameValueDescription
gamesession_idstring (255 characters)enable tracking the player game sessions that is unique per game launch
sessionidstring (255 characters)enable tracking of player sessions that is unique per login


REST REQUEST
Array
(
	[api_password] => xapitest
	[api_login] =>  xapitest
	[method] => getGame
	[lang] => en 
	//[user_id] => 123 //DEPRECATED
	[user_username] => domendomen2 //not required for fun mode
	[user_password] => 687ee8d988b2411bfc6983c4fca2f6c622819ac8 //not required for fun mode
	[gameid] => 568 // you can also use game hash from getGameList to start a game - for example ne#ne-jingle-spin
	[homeurl] => http://url.to.your.page.com
	[cashierurl] => http://url.to.cashier.page.com //optional
	[play_for_fun] => 0 //to launch sportsbook in demo use method getGameDemo
	[currency] => EUR
)

REST RESPONSE
{
    "error": 0,
    "response": "https://www.game-program.com/casino/frontend/EmbeddedGame/EmbeddedGame.swf?gameId=99&gameSWF=thePiramid.swf&sessionHash=test ",
    "new_parameter_example": "value_123",
    "gamesession_id": "gs9834ndasd",
    "sessionid": "123-898sdjkaERRA"
}

SOAP RESPONSE
// returned url is to be embedded in this manner, or in a popup window
 `iframe src="http://www.example.com/"`

Source Code
public function getGame($gameid,$lang = 'en',$play_for_fun = false){
	if(is_numeric($gameid) && $gameid > 0){
		return $this->client->getGame($gameid,$lang,$play_for_fun);
	}
}
Game launch diagram: