Skip to content

API Documentation for Game Administration

Ayman edited this page Mar 8, 2020 · 1 revision

These endpoints should be used sparingly and not for generic game control as they bypass standard game flow to manually manipulate the game information.

Reset All Pacdots

Description

Resets all pacdots to uneaten status.

This operation is idempotent (i.e. sending this request multiple times will yield the same result).

Request

Method

POST

Mapping

/admin/pacdots/reset

Response

Codes

HTTP Status Code Meanings
201 Created Reset all pacdots successfully
500 Internal Server Error The server crapped itself

JSON body

{
}

Example cURL call

Set a Player's state

Description

Updates the state of a Player.

See the possible names for a Player.

See the possible states for a Player.

This operation cannot change a Player's state to or from state UNINITIALIZED. To do so, see Select a Player and Deselect a Player in the Players documentation.

This operation is idempotent (i.e. a Player may be set to the same state they are currently in).

Request

Method

PUT

Mapping

/admin/player/{player_name}/state

Headers

Field Value(s)
Content-Type application/json

JSON body

{
	"state" : "READY"
}

Response

Codes

HTTP Status Code Meanings
200 OK Changed Player's location successfully
400 Bad Request Request body is incorrectly formed
404 Not Found The given name was invalid
The given state was invalid
409 Conflict The state cannot be changed to or from UNINITIALIZED with this operation (see above limitations).
The given state was illegal for the current player (see States).
500 Internal Server Error The server crapped itself

JSON body

{
}

Example cURL call