Skip to content

Commit 2fb15c6

Browse files
committed
CHANGES:
- RestAPI: /highscore added
1 parent 95d743a commit 2fb15c6

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

plugins/restapi/README.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,20 @@ DEFAULT:
2121
## RestAPI
2222
The following commands are available through the API
2323
24-
| API | GET / POST | Parameters | Return | Description |
25-
|-------------------|------------|---------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------|
26-
| /getuser | POST | nick: string | {"name": string, "date": date} | Return a list of players ordered by last seen that match this nick. |
27-
| /servers | GET | | [{"name": string, "status": string, "address": string, "password": string, "mission": {"name": string, "uptime": string, "date_time": string, "theatre", string, "blue_slots: int, "red_slots": int, "blue_slots_used": int, "red_slots_used": int, "restart_time": int}}] | Status for each server. |
28-
| /stats | POST | nick: string, date: date | {<br>"deaths": int,<br>"aakills": int,<br>"aakdr": float,<br>"lastSessionKills": int,<br>"lastSessionDeaths": int,<br>"killsbymodule": [<br>{"module": string, "kills": int}<br>],<br>"kdrByModule": [<br>{"module": string, "kdr": float}<br>]<br>} | Statistics of this player |
29-
| /topkills | GET | | {"fullNickname": string, "AAkills": int, "deaths": int, "AAKDR": float} | Top 10 of players ordered by kills descending. |
30-
| /topkdr | GET | | {"fullNickname": string, "AAkills": int, "deaths": int, "AAKDR": float} | Same as /topkills but ordered by AAKDR descending. |
31-
| /missilepk | POST | nick: string, date: date | {"weapon": {"weapon-name": string, "pk": float}} | Probability of kill for each weapon per given user. |
32-
| /credits | POSR | nick: string, date: date | [{"id": int, "name": string, "credits": float}] | Credits of a specific player. |
33-
| /squadrons | GET | | [{"name": string, "description": string, "image_url": string, "locked": boolean, "role": string}] | Lists all squadrons. |
34-
| /squadron_members | POST | name: string | [{"name": string, "date": date}] | Lists the members of the squadron with that name. |
35-
| /linkme | POST | discord_id: string, force: bool | {"token": 1234, "timestamp": "2025-02-03 xx:xx:xx...", "rc": 0} | Same as /linkme in discord. Returns a new token that can be used in the in-game chat. |
24+
| API | GET / POST | Parameters | Return | Description |
25+
|-------------------|------------|----------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------|
26+
| /getuser | POST | nick: string | {"name": string, "date": date} | Return a list of players ordered by last seen that match this nick. |
27+
| /servers | GET | | [{"name": string, "status": string, "address": string, "password": string, "mission": {"name": string, "uptime": string, "date_time": string, "theatre", string, "blue_slots: int, "red_slots": int, "blue_slots_used": int, "red_slots_used": int, "restart_time": int}}] | Status for each server. |
28+
| /stats | POST | nick: string, date: date | {<br>"deaths": int,<br>"aakills": int,<br>"aakdr": float,<br>"lastSessionKills": int,<br>"lastSessionDeaths": int,<br>"killsbymodule": [<br>{"module": string, "kills": int}<br>],<br>"kdrByModule": [<br>{"module": string, "kdr": float}<br>]<br>} | Statistics of this player |
29+
| /highscore | GET,POST | [server_name], [period], [limit] | | Highscore output |
30+
| /topkills | GET,POST | [limit] | {"fullNickname": string, "AAkills": int, "deaths": int, "AAKDR": float} | Top x of players ordered by kills descending. |
31+
| /topkdr | GET,POST | [limit] | {"fullNickname": string, "AAkills": int, "deaths": int, "AAKDR": float} | Same as /topkills but ordered by AAKDR descending. |
32+
| /trueskill | GET,POST | [limit] | | Top x trueskill ratings. |
33+
| /missilepk | POST | nick: string, date: date | {"weapon": {"weapon-name": string, "pk": float}} | Probability of kill for each weapon per given user. |
34+
| /credits | POSR | nick: string, date: date | [{"id": int, "name": string, "credits": float}] | Credits of a specific player. |
35+
| /squadrons | GET | | [{"name": string, "description": string, "image_url": string, "locked": boolean, "role": string}] | Lists all squadrons. |
36+
| /squadron_members | POST | name: string | [{"name": string, "date": date}] | Lists the members of the squadron with that name. |
37+
| /linkme | POST | discord_id: string, force: bool | {"token": 1234, "timestamp": "2025-02-03 xx:xx:xx...", "rc": 0} | Same as /linkme in discord. Returns a new token that can be used in the in-game chat. |
3638
3739
> [!IMPORTANT]
3840
> It is advisable to use a reverse proxy like nginx and maybe an SSL encryption between your webserver and this endpoint.

0 commit comments

Comments
 (0)