2018-07-03 20:22:53 +02:00
|
|
|
# Get all custom emoji
|
|
|
|
|
|
|
|
Get all the custom emoji in the user's organization.
|
|
|
|
|
|
|
|
`GET {{ api_url }}/v1/realm/emoji`
|
|
|
|
|
|
|
|
## Usage examples
|
|
|
|
|
2018-10-18 00:14:30 +02:00
|
|
|
{start_tabs}
|
|
|
|
{tab|python}
|
2018-07-03 20:22:53 +02:00
|
|
|
|
|
|
|
{generate_code_example(python)|/realm/emoji:get|example}
|
|
|
|
|
2018-10-18 00:14:30 +02:00
|
|
|
{tab|js}
|
2018-07-03 20:22:53 +02:00
|
|
|
|
|
|
|
More examples and documentation can be found [here](https://github.com/zulip/zulip-js).
|
|
|
|
```js
|
|
|
|
const zulip = require('zulip-js');
|
|
|
|
|
2019-01-07 14:27:58 +01:00
|
|
|
// Pass the path to your zuliprc file here.
|
2018-07-03 20:22:53 +02:00
|
|
|
const config = {
|
2019-01-07 14:27:58 +01:00
|
|
|
zuliprc: 'zuliprc',
|
2018-07-03 20:22:53 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
zulip(config).then((client) => {
|
|
|
|
return client.emojis.retrieve();
|
|
|
|
}).then(console.log);
|
|
|
|
```
|
|
|
|
|
2018-10-18 00:14:30 +02:00
|
|
|
{tab|curl}
|
|
|
|
|
|
|
|
```
|
|
|
|
curl {{ api_url }}/v1/realm/emoji \
|
|
|
|
-u BOT_EMAIL_ADDRESS:BOT_API_KEY
|
|
|
|
```
|
2018-07-03 20:22:53 +02:00
|
|
|
|
2018-10-18 00:14:30 +02:00
|
|
|
{end_tabs}
|
2018-07-03 20:22:53 +02:00
|
|
|
|
|
|
|
## Arguments
|
|
|
|
|
|
|
|
{generate_api_arguments_table|zulip.yaml|/realm/emoji:get}
|
|
|
|
|
|
|
|
## Response
|
|
|
|
|
|
|
|
#### Return values
|
|
|
|
|
|
|
|
* `emoji`: An object that contains `emoji` objects, each identified with their
|
|
|
|
emoji ID as the key, and containing the following properties:
|
|
|
|
* `id`: The ID for this emoji, same as the object's key.
|
|
|
|
* `name`: The user-friendly name for this emoji. Users in the organization
|
|
|
|
can use this emoji by writing this name between colons (`:name:`).
|
|
|
|
* `source_url`: The path relative to the organization's URL where the
|
|
|
|
emoji's image can be found.
|
|
|
|
* `deactivated`: Whether the emoji has been deactivated or not.
|
|
|
|
* `author`: An object describing the user who created the custom emoji,
|
|
|
|
with the following fields:
|
|
|
|
* `id`: The creator's user ID.
|
|
|
|
* `email`: The creator's email address.
|
|
|
|
* `full_name`: The creator's full name.
|
|
|
|
|
|
|
|
|
|
|
|
#### Example response
|
|
|
|
|
|
|
|
A typical successful JSON response may look like:
|
|
|
|
|
|
|
|
{generate_code_example|/realm/emoji:get|fixture(200)}
|