forked from andyburke/autonomous.contact
refactor: zones => topics
This commit is contained in:
parent
20a5d1bc88
commit
fac8f409f4
26 changed files with 470 additions and 469 deletions
28
public/api/topics/README.md
Normal file
28
public/api/topics/README.md
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# /api/topics
|
||||
|
||||
Interact with topics.
|
||||
|
||||
## POST /api/topics
|
||||
|
||||
Create a new topic.
|
||||
|
||||
```
|
||||
export type TOPIC = {
|
||||
id: string; // unique id for this topic
|
||||
name: string; // the name of the topic (max 128 characters)
|
||||
icon_url?: string; // optional url for a topic icon
|
||||
topic?: string; // optional topic topic
|
||||
tags: string[]; // a list of tags for the topic
|
||||
meta: Record<string, any>;
|
||||
limits: {
|
||||
users: number;
|
||||
user_messages_per_minute: number;
|
||||
};
|
||||
creator_id: string; // user_id of the topic creator
|
||||
emojis: Record<string, string>; // either: string: emoji eg: { 'rofl: 🤣, ... } or { 'rofl': 🤣, 'blap': 'https://somewhere.someplace/image.jpg' }
|
||||
};
|
||||
```
|
||||
|
||||
## GET /api/topics
|
||||
|
||||
Get topics.
|
||||
Loading…
Add table
Add a link
Reference in a new issue