28 lines
679 B
Markdown
28 lines
679 B
Markdown
# /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.
|