-
Notifications
You must be signed in to change notification settings - Fork 0
Restful Server API
Dimitris Kremmydas edited this page Oct 19, 2015
·
14 revisions
####/initGameSession/UUID_of_GAME_SESSION POST variables:
- definitionString: The xml string of the definition file
- listofPlayers: A JSON array of the participating players, in the form [{'uuid': 'first player uuid', {"uuid": "second player uuid", ...]players[]
- Returns: JSON Array {status: ['OK', 'ERROR'], errorMessage: 'string'}
####/advanceTurn/UUID_of_GAME_SESSION Returns: JSON Array {status: ['OK', 'ERROR'], errorMessage: 'string'}
####/submitChoices/UUID_of_GAME_SESSION POST variables:
- jsonString: {"uuid": "the player uuid", "choiceVariables": {"choice_variable1_name ": "value","choice_variable2_name ": "value",...}}
- Returns: JSON Array {status: ['OK', 'ERROR'], errorMessage: 'string'}
####/getWorldState/UUID_of_GAME_SESSION/TURN Returns:
- JSON string of a turn's world state variables {world_state_variable_name: value]}
####/getPlayerState/UUID_of_GAME_SESSION/UUID_of_PLAYER/TURN Returns:
- JSON string of a turn's player state variables {user_state_variable_name: value]}
####/getPlayerChoices/UUID_of_GAME_SESSION/UUID_of_PLAYER/TURN
- Returns: JSON string of a turn's player decisions {status: ['OK', 'ERROR'], errorMessage: 'string', results: {player_choice_var_name1: value, player_choice_var_name2: value, ...}
####/getScript/UUID_of_GAME_SESSION
- Returns the processed script (adding any INFO object before the actual script). It is useful for debugging purposes