Skip to content

Commit

Permalink
feat: ✨ add missing endpoints docs (#1) (thanks to https://github.com…
Browse files Browse the repository at this point in the history
…/diVineProportion)

Signed-off-by: Lucas Vieira <[email protected]>
  • Loading branch information
lucasvmx committed Dec 1, 2020
1 parent 1ed6e04 commit 9c90f36
Show file tree
Hide file tree
Showing 11 changed files with 864 additions and 1,299 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"cmake.configureOnOpen": false
}
134 changes: 67 additions & 67 deletions Gamechat/GameChat.md
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:
46 changes: 46 additions & 0 deletions Hudmsg/Hudmsg.md
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": ""
}
]
}
```
Loading

0 comments on commit 9c90f36

Please sign in to comment.