From a3b54a4b23866ae08c7f906d93f512c19db78d9d Mon Sep 17 00:00:00 2001 From: curly Date: Tue, 21 Feb 2023 15:04:45 -0700 Subject: Database limits, User fields/status --- README.md | 54 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 49 insertions(+), 5 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 58f9989..f4e1002 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,13 @@ DELETE `/delete_user` - Return type: JSON - Returns: `Result` +POST `set_user_data` + Sets data in the user fields +- Data type: JSON +- Data: `{user: UID, field: ReceiveDataField, data: String}` +- Return type: JSON +- Returns: `Result` + GET `/get_user/` Gets a user from id - Return type: JSON @@ -60,10 +67,7 @@ GET `/get_message_list//` POST `/send_message` Sends a message - Data type: JSON -- Data: - - `"sender": u64` - - `"message": String` - - `"reply_to": Option` +- Data: ReceiveMessage - Return type: JSON - Returns: `UID` of message @@ -72,4 +76,44 @@ DELETE `/delete_message` - Data type: JSON - Data: `UID` - Return type: JSON -- Returns: `Result` \ No newline at end of file +- Returns: `Result` + +# Types +- ReceiveDataField + - DisplayName + - StatusText + - Desc + +- ReceiveMessage + - message: String + - sender: UID + - reply_to: Option + +- UID + - u64 + +- Date + - u64 (date since epoch in UTC) + +- Status + - Online + - Offline + - Away + - Busy + +- User + - id: UID + - username: String (Max 20 chars) + - displayname: String (Max 30 chars) + - desc: String (Max 500 chars) + - statustext: String (Max 60 chars) + - status: Status + - deleted: bool + +- Message + - id: UID + - message: String (Max 6000 chars) + - reply_to: UID (of another message) + - deleted: bool + - date: Date + - sender: UID (of a User) \ No newline at end of file -- cgit v1.2.3