Note: All endpoint URLs should be used in the form: http(s)://<server_url>/<endpoint>
-
Datatypes
-
Channel:
- channel_name:
str
- channelID:
str
, - public:
bool
- permissions:
dict
, items:- r:
bool
- w:
bool
- x:
bool
- r:
- channel_name:
-
User:
- userID:
str
- username:
str
- color:
dict
, items:- r:
int
- g:
int
- b:
int
- r:
- userID:
-
Message:
- messageID:
str
- channelID:
str
- userID:
str
- keyID:
str
- send_time:
float
- type:
str
- data:
Union[str, bytes]
- messageID:
-
Invite
- uid:
str
- uses:
int
- expiration-time:
float
- data:
str
- uid:
-
-
Chatroom:
/chatroom/
- get: Unknown
- post:
- username:
str
- password:
str
- chatroom_name:
str
- -> Create chatroom
- username:
- note: this endpoint does not require
chatroom_id
-
Login:
/login/<chatroom_id>
-
get:
- userID:
str
- -> Check if logged in:
200
: logged in401
: not logged in
- userID:
-
post:
- userID:
str
- password:
str
- -> Return chatroom data
- chatroomID:
str
- userID:
str
- channels:
list[Channel]
- chatroomID:
- userID:
-
note:
userID
to becomeusername
in the near future.
-
-
Users:
/users/<chatroom_id>
- get:
- userID:
str
- -> Return all users in a chatroom:
list[User]
- userID:
- post: None
- get:
-
Channels:
/channels/<chatroom_id>
- get:
- userID:
str
- -> Return all channels a user has read-access to:
list[Channel]
- userID:
- post:
- userID:
str
- channel_name:
str
- -> Create a chatroom
- userID:
- get:
-
Messages:
/messages/<chatroom_id>
- get:
- userID:
str
- count:
Optional[int] <= 100
- time: (epoch)
Optional[float]
- get-method: one of
["since", "count"]
- channelID:
Optional[str]
- -> Get list of messages:
list[Message]
- userID:
- post
- userID:
str
- channelID:
str
- replyID:
str
- data:
str
- -> Send a message
- userID:
- note:
channelID
can filter messages by channel
- get:
-
Invites:
/invites/<chatroom_id>
- get
- userID:
str
- uses:
Optional[int]
- expiration-time: (epoch)
Optional[float]
- -> Create an invite
- userID:
- post
- inviteID:
str
- username:
str
- password:
str
- -> Use an invite
- inviteID:
- get