Skip to Content
🚧 Documentation is currently under construction. Check back for updates! 🚧
APIEndpoints

API Endpoints

This document outlines the available API endpoints for managing window controls, team actions, and application settings. All endpoints are prefixed with http://localhost:8080/api.

The API is divided into three main categories:


Window Actions

The api/window/ endpoints manage the application’s window states and utilities.

EndpointMethodDescription
/api/window/toggleWindowGETToggles the main window between open and closed states.
/api/window/minimizeWindowGETMinimizes the main window to the taskbar.
/api/window/closeWindowGETHides the main window without exiting the app.
/api/window/openWindowGETOpens the main window if it’s hidden or closed.
/api/window/toggleOrientationGETSwitches the main window’s orientation (e.g., horizontal/vertical).
/api/window/hotkeyManagerGETOpens the hotkey manager window.
/api/window/checkForUpdatesGETChecks for available application updates.
/api/window/aboutGETOpens the “About” window with app details.
/api/window/getAppVersionGETReturns the current application version as a string.
/api/window/getHotkeysGETRetrieves a list of all configured hotkeys.

Example

To toggle the window:

GET http://localhost:8080/api/window/toggleWindow

Response: 200 OK on success.


Team Actions

The api/team/ endpoints manage team-related data, such as scores, names, and appearances.

EndpointMethodQuery ParametersDescription
/api/team/swapTeamsGETNoneSwaps the positions of the two teams.
/api/team/resetTeamsGETNoneResets all team data to default values.
/api/team/updateMatchDataGETNoneRefreshes the current match data.
/api/team/incrementGETteam (required)Increments the score of the specified team by 1.
/api/team/decrementGETteam (required)Decrements the score of the specified team by 1.
/api/team/setScoreGETteam (required), score (required)Sets the score for the specified team.
/api/team/setTeamNameGETteam (required), name (required)Updates the name of the specified team.
/api/team/setTeamInfoGETteam (required), info (required)Sets additional info (e.g., description) for the team.
/api/team/setTeamColorGETteam (required), color (required)Sets the team’s color using a hex code (e.g., FF5733).
/api/team/setTeamLogoGETteam (required), logo (required)Sets the team’s logo (local path or URL).

Parameters

  • team: Must be 1 or 2 to specify the target team.
  • score: An integer value (e.g., 10).
  • color: A hex color code without # (e.g., FF5733 for orange).
  • logo: A file path (e.g., C:/logos/team1.png) or URL (e.g., https://example.com/logo.png).

Example

To set Team 1’s score to 5:

GET http://localhost:8080/api/team/setScore?team=1&score=5

Response: 200 OK on success, 400 Bad Request if parameters are missing.


App Actions

The api/app/ endpoints handle application-level configurations.

EndpointMethodQuery ParametersDescription
/api/app/selectgameconfigGETid (required)Selects a game configuration by its ID.
/api/app/selectgameconfigGETNoneReturns the current game configuration (if no id is provided).

Parameters

  • id: A unique identifier for the game config (e.g., config-123).

Example

To select a game config:

GET http://localhost:8080/api/app/selectgameconfig?id=config-123

Response: 200 OK on success.


General Notes

  • Base URL: All endpoints are accessed via http://localhost:8080/api.
  • Success Response: Returns 200 OK unless otherwise specified.
  • Error Handling: Missing or invalid query parameters result in a 400 Bad Request.
  • Hotkeys: Retrieved via /api/window/getHotkeys as a JSON object.
  • Team Values: The team parameter must be 1 or 2.
Last updated on