-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ✨ add missing endpoints docs (#1) (thanks to https://github.com…
…/diVineProportion) Signed-off-by: Lucas Vieira <[email protected]>
- Loading branch information
Showing
11 changed files
with
864 additions
and
1,299 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"cmake.configureOnOpen": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,68 @@ | ||
# Gamechat | ||
|
||
- Retrieves data from game chat | ||
|
||
<br> | ||
|
||
#### Detailed description | ||
|
||
Gamechat is accessed via url query parameters ``?field=value`` | ||
Note: these values start at 0 or 1 (whatever it is) only at game start. so the second match will start the id where the first match id ended. | ||
|
||
http://localhost:8111/gamechat?lastId=0 | ||
|
||
<br> | ||
|
||
#### HTTP Request | ||
- GET http://localhost:8111/gamechat | ||
|
||
#### Query parameters | ||
|
||
- lastId | ||
- gives you json of all chat messages up until the point you requested it | ||
|
||
- Example: | ||
- if there were 56 messages, and you requested ``GET http://localhost:8111/gamechat?lastId=55`` you would only get the last (56th) message (assuming that it has a index start of 0, not 1...) | ||
|
||
#### HTTP Response :white_check_mark: | ||
|
||
```json | ||
[ | ||
{ | ||
"id": 70, | ||
"msg": "hahaha", | ||
"sender": "pecusgaming", | ||
"enemy": false, | ||
"mode": "All" | ||
}, | ||
{ | ||
"id": 71, | ||
"msg": "this thing is slightly op tbh", | ||
"sender": "pecusgaming", | ||
"enemy": false, | ||
"mode": "All" | ||
} | ||
] | ||
``` | ||
|
||
### Fields | ||
|
||
- name: **id** | ||
* contains: integer | ||
* description: message id | ||
|
||
- name: **msg** | ||
* contains: string | ||
* description: message content | ||
|
||
- name: **sender** | ||
* contains: string | ||
* description: player name | ||
|
||
- name: **enemy** | ||
* contains: boolean | ||
* description: true if is a enemy player false otherwise | ||
|
||
- name: **mode** | ||
* contains: string | ||
# Gamechat | ||
|
||
- Retrieves data from game chat | ||
|
||
<br> | ||
|
||
#### Detailed description | ||
|
||
Gamechat is accessed via url query parameters ``?field=value`` | ||
Note: these values start at 0 or 1 (whatever it is) only at game start. so the second match will start the id where the first match id ended. | ||
|
||
http://localhost:8111/gamechat?lastId=0 | ||
|
||
<br> | ||
|
||
#### HTTP Request | ||
- GET http://localhost:8111/gamechat | ||
|
||
#### Query parameters | ||
|
||
- lastId | ||
- gives you json of all chat messages up until the point you requested it | ||
|
||
- Example: | ||
- if there were 56 messages, and you requested ``GET http://localhost:8111/gamechat?lastId=55`` you would only get the last (56th) message (assuming that it has a index start of 0, not 1...) | ||
|
||
#### HTTP Response :white_check_mark: | ||
|
||
```json | ||
[ | ||
{ | ||
"id": 70, | ||
"msg": "hahaha", | ||
"sender": "pecusgaming", | ||
"enemy": false, | ||
"mode": "All" | ||
}, | ||
{ | ||
"id": 71, | ||
"msg": "this thing is slightly op tbh", | ||
"sender": "pecusgaming", | ||
"enemy": false, | ||
"mode": "All" | ||
} | ||
] | ||
``` | ||
|
||
### Fields | ||
|
||
- name: **id** | ||
* contains: integer | ||
* description: message id | ||
|
||
- name: **msg** | ||
* contains: string | ||
* description: message content | ||
|
||
- name: **sender** | ||
* contains: string | ||
* description: player name | ||
|
||
- name: **enemy** | ||
* contains: boolean | ||
* description: true if is a enemy player false otherwise | ||
|
||
- name: **mode** | ||
* contains: string | ||
* description: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Hudmsg | ||
|
||
- very similar to gamechat.. instead of a list of dicts, its a dict with keys events and damage, events is always empty iirc, and damage is a list of dicts | ||
|
||
<br> | ||
|
||
#### Detailed description | ||
|
||
Hudmsg is accessed via url query parameters ``?field=value`` | ||
Note: these values start at 0 or 1 (whatever it is) only at game start. so the second match will start the id where the first match id ended. | ||
|
||
http://localhost:8111/hudmsg?lastEvt=0&lastDmg=0 | ||
|
||
#### HTTP Request | ||
- GET http://localhost:8111/hudmsg | ||
|
||
#### Query parameters | ||
|
||
- lastEvt | ||
- id of event to search | ||
|
||
- lastDmg | ||
- id of damage | ||
|
||
#### HTTP Response :white_check_mark: | ||
```json | ||
{ | ||
"events": [], | ||
"damage": [ | ||
{ | ||
"id": 161, | ||
"msg": "percusiones1r (Spitfire) set afire *shino_rs (Spitfire)", | ||
"sender": "", | ||
"enemy": false, | ||
"mode": "" | ||
} | ||
{ | ||
"id": 162, | ||
"msg": "*shino_rs (Spitfire) has crashed.", | ||
"sender": "", | ||
"enemy": false, | ||
"mode": "" | ||
} | ||
] | ||
} | ||
``` |
Oops, something went wrong.