From 136c1b97a01c06019e476dc212541d3b9ea04533 Mon Sep 17 00:00:00 2001 From: Ryan <7389646+ryanbarlow97@users.noreply.github.com> Date: Sun, 22 Mar 2026 22:10:43 +0000 Subject: [PATCH] add api doc update (#3492) ## Description: updated API docs with infra changes. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced ## Please put your Discord username so you can be contacted if a bug or regression is found: w.o.n --- docs/API.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/API.md b/docs/API.md index e2e144bc5..16f82297b 100644 --- a/docs/API.md +++ b/docs/API.md @@ -22,13 +22,16 @@ GET https://api.openfront.io/public/games - `start` (required): ISO 8601 timestamp - `end` (required): ISO 8601 timestamp - `type` (optional): Game type, must be one of `[Private, Public, Singleplayer]` +- `mode` (optional): Game mode, must be one of `[Free For All, Team]` +- `rankedType` (optional): Ranked type, must be one of `[unranked, 1v1]` +- `playerTeams` (optional): Player team configuration (e.g. `Duos`) - `limit` (optional): Number of results (max 1000, default 50) - `offset` (optional): Pagination offset **Example Request:** ```bash -curl "https://api.openfront.io/public/games?start=2025-10-25T00:00:00Z&end=2025-10-26T23:59:59Z&type=Singleplayer&limit=10&offset=5" +curl "https://api.openfront.io/public/games?start=2025-10-25T00:00:00Z&end=2025-10-26T23:59:59Z&type=Public&mode=Team&rankedType=unranked&limit=10&offset=5" ``` **Response:** @@ -39,9 +42,14 @@ curl "https://api.openfront.io/public/games?start=2025-10-25T00:00:00Z&end=2025- "game": "ABSgwin6", "start": "2025-10-25T00:00:10.526Z", "end": "2025-10-25T00:19:45.187Z", - "type": "Singleplayer", - "mode": "Free For All", - "difficulty": "Medium" + "type": "Public", + "mode": "Team", + "difficulty": "Medium", + "numPlayers": 6, + "maxPlayers": 8, + "lobbyFillTime": 45000, + "playerTeams": "Duos", + "rankedType": "unranked" } ] ```