-
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, DELETE
- 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
- Associated Route: GET /api/users/{user}
Creates and stores a new user.
- Parameters: $request: UserStoreRequest
- Associated Route: POST /api/users
Updates the location of a user (user specified by id).
- Parameters: $request: UpdateLocationRequest, $user: User
- Associated Route: PUT /api/users/{user}
Returns one of three options regarding invite keys (invite key specified by invite key value):
- Error message: "The given invite key is in use"
- Error message: "The given key has expired since its parent game has ended"
- The given key object as JSON
- Parameters: $key: InviteKey
- Associated Route: GET /api/invite-keys/{key}
Returns a game's details (game specified by id).
- Parameters: $game: Game
- Associated Route: GET /api/games/{game}
Returns all the users that belong to a game (game specified by id).
- Parameters: $game: Game
- Associated Route: GET /api/games/{game}/users
Returns all the users, including their roles, that belong to a game (game specified by id).
- Parameters: $game: Game
- Associated Route: GET /api/games/{game}/users-with-role
Returns all the loot that belongs to a game (game specified by id).
- Parameters: $game: Game
- Associated Route: GET /api/games/{game}/loot
Returns a game's border markers (game specified by id).
- Parameters: $game: Game
- Associated Route: GET /api/games/{game}/border-markers
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 /games
Sends a request to the server to create a new game. Redirects the user to the new game's configuration screen.
- Parameters: none
- Associated Route: POST /games
Sends a request to the server to remove a game (game specified by id). Redirects the user back to the index page.
- Parameters: $game: Game
- Associated Route: DELETE /games/{game}
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: $game: Game
- Associated Route: GET /games/{game}
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: GenerateKeysRequest, $game: Game
- Associated Route: POST /games/{game}/invite-keys
Sends a request to the server to store specified border markers. This route is not to be called manually, and is instead designed to be called via AJAX.
- Parameters: $request: StoreBorderMarkerRequest, $game: Game
- Associated Route: POST /games/{game}/border-markers
Sends a request to the server to update a game's status (game specified by id).
- Parameters: $request: UpdateGameStateRequest, $game: Game
- Associated Route: PUT /games/{game}