feature: rooms and events implemented on the backend
This commit is contained in:
parent
df00324e24
commit
85024c6e62
29 changed files with 1659 additions and 115 deletions
28
public/api/rooms/README.md
Normal file
28
public/api/rooms/README.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
# /api/rooms
|
||||
|
||||
Interact with rooms.
|
||||
|
||||
## POST /api/rooms
|
||||
|
||||
Create a new room.
|
||||
|
||||
```
|
||||
export type ROOM = {
|
||||
id: string; // unique id for this room
|
||||
name: string; // the name of the room (max 128 characters)
|
||||
icon_url?: string; // optional url for a room icon
|
||||
topic?: string; // optional room topic
|
||||
tags: string[]; // a list of tags for the room
|
||||
meta: Record<string, any>;
|
||||
limits: {
|
||||
users: number;
|
||||
user_messages_per_minute: number;
|
||||
};
|
||||
creator_id: string; // user_id of the room creator
|
||||
emojis: Record<string, string>; // either: string: emoji eg: { 'rofl: 🤣, ... } or { 'rofl': 🤣, 'blap': 'https://somewhere.someplace/image.jpg' }
|
||||
};
|
||||
```
|
||||
|
||||
## GET /api/rooms
|
||||
|
||||
Get rooms.
|
Loading…
Add table
Add a link
Reference in a new issue