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