diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-07-13 18:52:31 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-07-30 16:01:26 +0300 |
commit | b4c4b48a8c0258ff266c523488aa169a1b5ea0f3 (patch) | |
tree | 7b2c5a6b1f3bc7e672cb3e64600e6bd2403d8748 /doc/api/users.md | |
parent | 812bfb158b70b09cfd438379a4b9446aa85b52ec (diff) |
Allow users to set a status
This can be done trough the API for the current user, or on the
profile page.
Diffstat (limited to 'doc/api/users.md')
-rw-r--r-- | doc/api/users.md | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/doc/api/users.md b/doc/api/users.md index 07f9baf06d2..481219de0f1 100644 --- a/doc/api/users.md +++ b/doc/api/users.md @@ -440,6 +440,67 @@ GET /user } ``` +## User status + +Get the status of the currently signed in user. + +``` +GET /user/status +``` + +```json +{ + "emoji":"coffee", + "message":"I crave coffee" +} +``` + +## Get the status of a user + +Get the status of a user. + +``` +GET /users/:id_or_username/status +``` + +```json +{ + "emoji":"coffee", + "message":"I crave coffee" +} +``` + +Parameters: + +| Attribute | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `id_or_username` | string | yes | The id or username of the user to get a status of | + + +## Set user status + +Set the status of the current user. + +``` +PUT /user/status +``` + +```json +{ + "emoji":"coffee", + "message":"I crave coffee" +} +``` + +Parameters: + +| Attribute | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `emoji` | string | no | The name of the emoji to use as status, if omitted `speech_balloon` is used. Emoji name can be one of the specified names in the [Gemojione index][gemojione-index]. | +| `message` | string | no | The message to set as a status | + +When both parameters are empty, the status will be cleared. + ## List user projects Please refer to the [List of user projects ](projects.md#list-user-projects). @@ -1167,3 +1228,5 @@ Example response: ``` Please note that `last_activity_at` is deprecated, please use `last_activity_on`. + +[gemojione-index]: https://github.com/jonathanwiesel/gemojione/blob/master/config/index.json |