From 7d16bc450de2de3ae7afe044192db485a05a3cc9 Mon Sep 17 00:00:00 2001 From: cbax Date: Tue, 24 Sep 2024 19:47:36 +0000 Subject: [PATCH] Update README.md --- README.md | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c315a73..0899a21 100644 --- a/README.md +++ b/README.md @@ -13,12 +13,20 @@ A small chat box API for use on public websites. - Responsive web UI - Embed/iframe-able +## Deps + - rocket + - sled + - snowflake id + + ## API -- init: takes a cookie, returns a session if exits, else requests new session. -- channels: returns a list of channels and a preview message for each -- join: takes a username and channel, returns `init_scrollback` previous messages, a sync rate, and a client identifier, or an error if username exists/is not allowed, or channel does not exist -- sync: takes a client identifier and returns all unseen messages +- init: takes a cookie, returns a session (previous username, current channel, etc) if exits, else require login +- login: takes a username and IP, returns a session cookie +- create_channel: takes a cookie, channel name, and motd, returns a channel id +- channels: takes a cookie returns a list of channels and a preview message for each +- join: takes a cookie and channel id, returns `init_scrollback` previous messages, a sync rate, and a client identifier, or an error if username exists/is not allowed, or channel does not exist +- sync: takes a cookie and a last message id and returns all unseen messages. - send: sends a message, returns a status - login: accepts password, gives client admin perms if password is correct - delete: takes an admin client identifier and a message id @@ -29,13 +37,21 @@ A small chat box API for use on public websites. - config - admin_password - ratelimit (req/min) + - `[reserved_username:ip_address]` - `[banned_words]` - `[banned_usernames]` - `[banned_ips]` - init_scrollback - sync_rate +- channel + - id + - name + - motd + - message + - id + - channel_id - client_id - timestamp - body @@ -46,4 +62,5 @@ A small chat box API for use on public websites. - ip_address - admin_perms - banned - - ratelimit \ No newline at end of file + - ratelimit + - last_channel_id \ No newline at end of file