freechat/docs/api.md
2020-05-05 21:56:39 -07:00

1.2 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

/channels/list/<voice>
/channels/list/<text>

Return: List of struct::Channels owned by the server voice/text

/channels/voice/

Return: List of struct::Members in that given channel

Messaging

/message/recent/<channel>

Parameters: opt::limit Request the last hours of messages. By default the last 24 hours of messages is given unless otherwise specified

Behavior: Should really only be necessary to update channel members periodically when the client is opened up to that server exactly.

Structures

Member { name: string id: u64 permissions: u64 }

Channel { name: string description: string type: integer [1=Voice Channel, 2=Text Channel] }

Message { content: string author: Member date: Unix Timestamp }

Badge { name: string permissions: u64 color: u32 }