-
Notifications
You must be signed in to change notification settings - Fork 0
Documentation
The API provides a variety of routes that support both the online Blade-based configuration screens as well as the Xamarin-based cross-platform mobile app. The API is used to send data from the configuration screens to the clients and vice versa. In order to achieve client synchronization, data pushing is used as opposed to data polling. Pusher App is used to achieve this goal. The API currently does not support any user authentication platforms using tokens.
- API language: php ^7.3|^8.0 (Laravel)
- API structure: REST
- Supported HTTP methods: GET, POST, PUT
- Security platforms: CSRF tokens, TLS support
- User authentication platform: none
- User authentication definition: none
- Supported database engine: MySQL
- Database setup-structure: Laravel migrations
Returns information regarding a singular user (user specified by id).
- Parameters: $user: User object
- Associated Route: GET /api/users/{user}
Updates the location of a user (user specified by id).
- Parameters: $request: Request (PUT form), $user: User object
- Associated Route: PUT /api/users/{user}
Creates and stores a new user.
- Parameters: $request: Request (POST form)
- Associated Route: POST /api/users
Returns one of three options regarding invite keys (invite key specified by invite key value):
- The given invite key does not exist
- The given invite key is already in use
- The given invite key is available for use
- Parameters: $inviteKeyId: Invite key value (example: AB12)
- Associated Route: GET /invite-key/{inviteKeyId}
Returns all the users that belong to a game (game specified by id).
- Parameters: $gameId: Game ID
- Associated Route: GET /game/{gameId}/users
Returns all the loot that belongs to a game (game specified by id).
- Parameters: $gameId: Game ID
- Associated Route: GET /game/{gameId}/loot
Returns a game's status (game specified by id).
- Parameters: $gameId: Game ID
- Associated Route: GET /game/{gameId}/status
Firstly, the configuration screens allow a game leader to specify certain game details such as game duration or game area. The invite keys for a game are also generated here. After all of the game settings have been set to the game leader's prefered values, a game can be started with the click of a button. Secondly, after a game has been started, the configuration screens provide the game leader with certain game details and interactions, such as an overview of the players' last known locations and buttons for pausing, resuming and ending a game.
- Configuration screens language: Blade HTML
- Supported browsers: any
- User authentication method: To be implemented
- User authentication definition: To be implemented
Returns a view for creating a new game or selecting / deleting an existing game.
- Parameters: none
- Associated Route: GET /
Sends a request to the server to create a new game. Redirects the user to the new game's configuration screen.
- Parameters: $request: Request (POST form)
- Associated Route: POST /createGame
Sends a request to the server to remove a game (game specified by id). Redirects the user back to the index page.
- Parameters: $id: Game ID
- Associated Route: GET /removeGame/{id}
Returns the configuration screen for a game (game specified by id). If a game has already started, this route will redirect the user to the game's in-game configuration page instead.
- Parameters: $id: Game ID
- Associated Route: GET /games/{id}
Sends a request to the server to generate invite keys for a game. This route is not to be called manually, and is instead designed to be called via AJAX.
- Parameters: $request: Request (POST form)
- Associated Route: POST /storeKeys
Sends a request to the server to update a game's status (game specified by id).
- Parameters: $request: UpdateGameStateRequest (PUT custom validation form), $id: Game ID
- Associated Route: PUT /games/{id}