forked from CRSS/Website
feat: some website <-> server communications "proposal"
This commit is contained in:
parent
0daff3ecfa
commit
60a53467b2
|
@ -11,3 +11,5 @@ DB_HOST=
|
|||
DB_PORT=
|
||||
|
||||
AUTH_SECRET=
|
||||
|
||||
MC_API=
|
28
docs/crss_server_api.md
Normal file
28
docs/crss_server_api.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
# The CRSS Mod <-> CRSS Website Communication API
|
||||
|
||||
A layer bellow the website api to retrieve and send data to the CRSS server. For example a user requests `https://crss.cc/api/v1/server/players`, the website api will call the crss mod api to get the data from the server.
|
||||
|
||||
It will use not use http for reasons.
|
||||
|
||||
## Packets
|
||||
|
||||
### Get Server Info
|
||||
|
||||
#### Client -> Server
|
||||
|
||||
| Identifier | Lenght |
|
||||
|------------|-----------------------|
|
||||
| `0x00` | `0x00 0x00 0x00 0x00` |
|
||||
|
||||
* Identifier (1 Byte) - `0x00`
|
||||
* Length (4 Bytes) - `UInt32`
|
||||
|
||||
#### Server -> Client
|
||||
|
||||
| Identifier | Lenght | Data |
|
||||
|------------|-----------------------|-----------|
|
||||
| `0x00` | `0x00 0x00 0x00 0x00` | `{ ... }` |
|
||||
|
||||
* Identifier (1 Byte) - `0x00`
|
||||
* Length (4 Bytes) - `UInt32`
|
||||
* Data (*Lenght) - `String` - JSON Object
|
Loading…
Reference in a new issue