freechat/docs/api.md

59 lines
975 B
Markdown

# Server Requests
```
/auth/login
```
Parameters:
username
set via a config the first time the app is started up
server-generated-access-key
this is given to us the first time we join the server
Return:
Session key
```
/channels/list/voice
/channels/list/text
```
Return:
List of channels owned by the server
```
for channel in text_channels
GET /channnels/history/{channel}
```
Behavior:
By default the client requests the most recent 100 messages
But it shows the most recently cached messages from the last session
```
for channel in voice_channels
GET /channels/vc_members/{channel}
```
Behavior:
By default we request the people in the voce chat on login but only
cache updates during sessions, not between sessions
# Response Objects
Channel {
name: string
description: string
type: integer [1=Voice Channel, 2=Text Channel]
}
User {
userid: u64
username: string
}
Message {
content: string
author: User
date: Unix timestamp(u64)
}