axbg / interchat

Winner of the Diversity challenge @ DevHacks 2021

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

API structure

axbg opened this issue · comments

API Design

/ws - Web-Socket endpoint

/api
/user - POST - create a new user specifying username, input_language, output_language
/user - PUT - updates values for input_language and output_language

/room - GET - get a list of all public rooms
/room - POST - create a new room specifying name and public/private characteristic
/room - DELETE - exit from a room (if the admin exits a room the room is destroyed)

/room/join - POST - join a room (either public or private)
/room/promote - PUT - delegate a new admin for a room
/room/kick/:user_id - shadow bans a user

just remember that on join room you will also get the preferences