structures section now in its own page
This commit is contained in:
parent
e945897ac1
commit
0cddfc3289
50
docs/structures.md
Normal file
50
docs/structures.md
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
# Structures
|
||||||
|
|
||||||
|
Below are various structures that client builds can expect to receive.
|
||||||
|
These are not representative of how instances internally store data but what a client can expect to receive from different API requests.
|
||||||
|
|
||||||
|
1. Member
|
||||||
|
|
||||||
|
```
|
||||||
|
Member {
|
||||||
|
name: string
|
||||||
|
id: u64
|
||||||
|
permissions: u64
|
||||||
|
badges: List<Badge>
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Channel
|
||||||
|
|
||||||
|
```
|
||||||
|
Channel {
|
||||||
|
name: string
|
||||||
|
description: string
|
||||||
|
type: integer [1=Voice Channel, 2=Text Channel]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Message
|
||||||
|
|
||||||
|
While `Message` responses don't specify what channel they belong a channel
|
||||||
|
does have to be used to request these so it's up to the client to store these
|
||||||
|
in a way that makes sense.
|
||||||
|
|
||||||
|
```
|
||||||
|
Message {
|
||||||
|
author: Member
|
||||||
|
date: u64 -> [unix timestamp since epoch]
|
||||||
|
content: string
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Badge
|
||||||
|
|
||||||
|
```
|
||||||
|
Badge {
|
||||||
|
name: string
|
||||||
|
permissions: u64
|
||||||
|
color: u32
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
Loading…
Reference in New Issue
Block a user