freechat/docs/api.md
2020-04-25 18:33:16 -07:00

1.1 KiB

NOTE:

This document makes no attempt to outline/describe how voice connections are handled by the server/client. That information is found elsewhere.

Auth Routes

/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) }