Player Enters a Tournament
Player selects a tournament from the list of tournaments that the game displays to the player.
Get the list of tournaments
The game app calls GET Tournaments and the API responds with a list of tournaments.
This request includes four optional query parameters, to control the tournaments that the API returns. The game app can use the query parameters to filter the Get Tournament request by tournament status (live or upcoming), by time period, and by player attributes. You can also set the maximum number of tournaments to include in the response.
The successful response includes a list of tournaments.
The game provides a UI control to provide the option for the player to browse the tournaments.
Player selects a tournament
The player chooses to browse the tournaments.
The game needs to provide an option to view the details for any of the tournaments in the display.
If the player chooses to view the details of a tournament, the game app calls GET Tournament Details, using the tournament ID of the selected tournament. Optionally, you can specify player attributes for this player. If the player is not eligible for the tournament, the API returns HTTP 200, but the "canEnter" field is set to false.
The game app displays the tournament details. See the following example:
{
"canEnter": true,
"dateEnd" : 1506322800000,
"dateStart" : 1505335200000,
"description" : "It's not about hiring the best troops or winning PvP battles, it's about prevailing against all odds.",
"hasAccessKey": false,
"imageUrl" : "https://s3.amazonaws.com/tournament-prizes/Prize-Item-1.png",
"matchesPerPlayer" : 100,
"playerAttemptsPerMatch" : 3,
"playersPerMatch" : 1000,
"prizeBundles" : [ {
"description" : "This chest contains better loot than a Silver Reward Chest!",
"imageUrl" : "https://images-na.ssl-images-amazon.com/images/I/51J6cQ63OJL._AC_US218_.png",
"prizeIds" : [ "1a3ea1ef-0e8f-4cfc-91fc-bd3fd70a6ab2", "979e4402-bd33-45ef-add9-2b8fb812d912" ],
"rankFrom" : 1,
"rankTo" : 3,
"title" : "Gold Reward Chest"
} ],
"title" : "Heavy Hitters",
"scoreType" : "Individual",
"subtitle" : "Pirate's Booty",
"tournamentId" : "00230795-b4bd-40ef-b181-720ee0ec3d80",
"winType" : "highest"
}
Player enters the tournament
The game app provides the player an option to enter the tournament.
If the player chooses to enter the tournament, the game app calls Enter Tournament. The system searches for an open match within the tournament and returns the match ID in the response.
If the tournament has specific requirements (or an access key), the game app should populate the player attributes field in the request body, so that the player will be accepted into the tournament. The following shows an example request body:
{
"playerAttributes" : {
"status" : "vip",
"skill" : 1,
"isActive" : true,
"gpsCoordinates" : "{\"latitude\": 33.652275, \"longitude\": -117.750495}"
},
"accessKey" : "ADEF"
}