diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-07-26 17:14:02 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-08-01 12:42:04 +0200 |
commit | 12095251c3777c5231cab97854d5dca69d31cc5d (patch) | |
tree | ebc87b5e48521c36f358cc9ade98563a8804417d /doc | |
parent | 78c6f9a2d6d3211402ca07813871c5b4f1a1dc57 (diff) | |
download | gitlab-ce-12095251c3777c5231cab97854d5dca69d31cc5d.tar.gz |
Add the message HTML to the UserStatus api
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/users.md | 54 |
1 files changed, 35 insertions, 19 deletions
diff --git a/doc/api/users.md b/doc/api/users.md index 8290279c295..a8858468cab 100644 --- a/doc/api/users.md +++ b/doc/api/users.md @@ -448,10 +448,17 @@ Get the status of the currently signed in user. GET /user/status ``` +```bash +curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/user/status" +``` + +Example response: + ```json { "emoji":"coffee", - "message":"I crave coffee" + "message":"I crave coffee :coffee:", + "message_html": "I crave coffee <gl-emoji title=\"hot beverage\" data-name=\"coffee\" data-unicode-version=\"4.0\">☕</gl-emoji>" } ``` @@ -463,20 +470,24 @@ Get the status of a user. GET /users/:id_or_username/status ``` +| Attribute | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `id_or_username` | string | yes | The id or username of the user to get a status of | + +```bash +curl "https://gitlab.example.com/users/janedoe/status" +``` + +Example response: + ```json { "emoji":"coffee", - "message":"I crave coffee" + "message":"I crave coffee :coffee:", + "message_html": "I crave coffee <gl-emoji title=\"hot beverage\" data-name=\"coffee\" data-unicode-version=\"4.0\">☕</gl-emoji>" } ``` -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. @@ -485,21 +496,26 @@ 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. It can also contain emoji codes. | -When both parameters are empty, the status will be cleared. +When both parameters `emoji` and `message` are empty, the status will be cleared. + +```bash +curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --data "emoji=coffee" --data "emoji=I crave coffee" https://gitlab.example.com/api/v4/user/status +``` + +Example responses + +```json +{ + "emoji":"coffee", + "message":"I crave coffee", + "message_html": "I crave coffee" +} +``` ## List user projects |