aboutsummaryrefslogtreecommitdiff
path: root/API.md
diff options
context:
space:
mode:
authorrr-2016-04-09 21:41:10 +0200
committerrr-2016-04-09 22:38:57 +0200
commite8aeb110814e8f764a3b4d7eeaaae17b26787f88 (patch)
treeb3f4bc907c20cfd3b3b9851408b58bf3de16790c /API.md
parent403cfbd679aa8d8c55f666b1ae9513b13ee3632a (diff)
server/users: add avatar support
Diffstat (limited to 'API.md')
-rw-r--r--API.md11
1 files changed, 8 insertions, 3 deletions
diff --git a/API.md b/API.md
index 31e0b49..332a34c 100644
--- a/API.md
+++ b/API.md
@@ -163,9 +163,11 @@ Input:
"name": <user-name>,
"password": <user-password>,
"email": <email>,
- "rank": <rank>
+ "rank": <rank>,
+ "avatar_style": <avatar-style>
}
```
+Files: `avatar` - the content of the new avatar.
Output:
```json5
{
@@ -176,12 +178,15 @@ Output:
Errors: if the user does not exist, or the user with new name already exists
(names are case insensitive), or either of user name, password, email or rank
are invalid, or the user is trying to update their or someone else's rank to
-higher than their own, or privileges are too low.
+higher than their own, or privileges are too low, or avatar is missing for
+manual avatar style.
Updates an existing user using specified parameters. Names and passwords must
match `user_name_regex` and `password_regex` from server's configuration,
respectively. All fields are optional - update concerns only provided fields.
-To update last login time, see [authentication](#authentication).
+To update last login time, see [authentication](#authentication). Avatar style
+can be either `gravatar` or `manual`. `manual` avatar style requires client to
+pass also `avatar` file - see [file uploads](#file-uploads) for details.
### Getting user

© 2015 - 2026 Jakob L. Kreuze