new docs for the updated api requirements

This commit is contained in:
shockrah 2020-05-05 21:56:39 -07:00
parent 62204e52ca
commit 04ca53dc79

View File

@ -18,33 +18,42 @@ Parameters:
Return:
Session key
# Channels
```
/channels/list/voice
/channels/list/text
/channels/list/<voice>
/channels/list/<text>
```
Return:
List of channels owned by the server
List of struct::Channels owned by the server voice/text
/channels/voice/<channel>
Return:
List of struct::Members in that given channel
# Messaging
```
for channel in text_channels
GET /channnels/history/{channel}
/message/recent/<channel>
```
Parameters:
opt::limit
Request the last <X> hours of messages.
By default the last 24 hours of messages is given unless otherwise specified
Behavior:
By default the client requests the most recent 100 messages
But it shows the most recently cached messages from the last session
Should really only be necessary to update channel members periodically when the client is opened up to that server exactly.
```
for channel in voice_channels
GET /channels/vc_members/{channel}
```
# Structures
Behavior:
By default we request the people in the voce chat on login but only
cache updates during sessions, not between sessions
# Response Objects
Member {
name: string
id: u64
permissions: u64
}
Channel {
name: string
@ -52,13 +61,15 @@ Channel {
type: integer [1=Voice Channel, 2=Text Channel]
}
User {
userid: u64
username: string
}
Message {
content: string
author: User
date: Unix timestamp(u64)
author: Member
date: Unix Timestamp<u64>
}
Badge {
name: string
permissions: u64
color: u32
}