Update 'resources/Docs/DOCS.md'
This commit is contained in:
parent
6d99951fe7
commit
e7da5de255
1 changed files with 23 additions and 5 deletions
|
@ -47,23 +47,25 @@ JSON data format:
|
||||||
| Field | Description |
|
| Field | Description |
|
||||||
| - | - |
|
| - | - |
|
||||||
| token | The authentication token |
|
| token | The authentication token |
|
||||||
| client? | The name of the application the client is connecting from (see below) |
|
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
```json
|
```json
|
||||||
1@{"token":"my totally real token","client":"amazing client"}
|
1@{"token":"my totally real token"}
|
||||||
```
|
```
|
||||||
|
|
||||||
If the token is invalid, or the connection is otherwise rejected, the client should be disconnected as soon as possible, and no YOO\_ACK should be sent.
|
If the token is invalid, or the connection is otherwise rejected, the client should be disconnected as soon as possible, and no YOO\_ACK should be sent.
|
||||||
|
|
||||||
It is suggested that the field "client" is send in the format of "(operating system)/(user agent vendor)/(user agent)/(optional full user agent string)", example: "Linux/Mozilla/Firefox/some firefox useragent string idk"
|
|
||||||
|
|
||||||
## 2:YOO\_ACK
|
## 2:YOO\_ACK
|
||||||
*Part of handshake, Server to client*
|
*Part of handshake, Server to client*
|
||||||
|
|
||||||
Sent by the server as soon as possible after processing the YOO payload from the client.
|
Sent by the server as soon as possible after processing the YOO payload from the client.
|
||||||
|
|
||||||
This payload contains an empty JSON object, that may have data added to it in later versions of this software.
|
JSON data format:
|
||||||
|
| Field | Description |
|
||||||
|
| - | - |
|
||||||
|
| user | A [message author object](#message-author-object) |
|
||||||
|
| session_id | A UUIDv4 |
|
||||||
|
| channels | An array of [channels](#channel-object) |
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
```json
|
```json
|
||||||
|
@ -185,6 +187,22 @@ Used mostly for messages.
|
||||||
| _id | The id of the channel |
|
| _id | The id of the channel |
|
||||||
| name | The name of the channel |
|
| name | The name of the channel |
|
||||||
|
|
||||||
|
## Channel object
|
||||||
|
|
||||||
|
| Field | Description |
|
||||||
|
| - | - |
|
||||||
|
| _id | The id of the channel |
|
||||||
|
| name | The name of the channel |
|
||||||
|
| creator | A [user object](#user-object) |
|
||||||
|
|
||||||
|
## User object
|
||||||
|
|
||||||
|
| Field | Description |
|
||||||
|
| - | - |
|
||||||
|
| _id | The id of the user |
|
||||||
|
| name | The name of the user |
|
||||||
|
| color | A hex color that represents that user |
|
||||||
|
|
||||||
## Message author object
|
## Message author object
|
||||||
|
|
||||||
Used mostly for messages.
|
Used mostly for messages.
|
||||||
|
|
Reference in a new issue