diff options
author | Lorenz Diener <[email protected]> | 2017-12-13 17:17:42 +0100 |
---|---|---|
committer | Lorenz Diener <[email protected]> | 2017-12-13 17:17:42 +0100 |
commit | 75aebac744717216118afcdb89c96cfe8856e9ef (patch) | |
tree | fd381f166313ef126f4589e4443b642cb9a20aec | |
parent | c06baa13b30fc5ce058940e681305f6c03dc0048 (diff) | |
download | mastodon.py-75aebac744717216118afcdb89c96cfe8856e9ef.tar.gz |
Add custom_emojis
-rw-r--r-- | docs/index.rst | 5 | ||||
-rw-r--r-- | mastodon/Mastodon.py | 13 |
2 files changed, 18 insertions, 0 deletions
diff --git a/docs/index.rst b/docs/index.rst index 1d8f138..3dff97a 100644 --- a/docs/index.rst +++ b/docs/index.rst | |||
@@ -496,6 +496,11 @@ Reading data: Domain blocks | |||
496 | 496 | ||
497 | .. automethod:: Mastodon.domain_blocks | 497 | .. automethod:: Mastodon.domain_blocks |
498 | 498 | ||
499 | Reading data: Emoji | ||
500 | ------------------- | ||
501 | |||
502 | .. automethod:: Mastodon.custom_emojis | ||
503 | |||
499 | Writing data: Statuses | 504 | Writing data: Statuses |
500 | ---------------------- | 505 | ---------------------- |
501 | These functions allow you to post statuses to Mastodon and to | 506 | These functions allow you to post statuses to Mastodon and to |
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index 1c7b2ee..8130b2c 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py | |||
@@ -714,6 +714,19 @@ class Mastodon: | |||
714 | return self.__api_request('GET', '/api/v1/domain_blocks', params) | 714 | return self.__api_request('GET', '/api/v1/domain_blocks', params) |
715 | 715 | ||
716 | ### | 716 | ### |
717 | # Reading data: Emoji | ||
718 | ### | ||
719 | @api_version("2.1.0") | ||
720 | def custom_emojis(self): | ||
721 | """ | ||
722 | Fetch the list of custom emoji the instance has installed. | ||
723 | |||
724 | Returns a list of emoji dicts. | ||
725 | |||
726 | """ | ||
727 | return self.__api_request('GET', '/api/v1/custom_emojis') | ||
728 | |||
729 | ### | ||
717 | # Writing data: Statuses | 730 | # Writing data: Statuses |
718 | ### | 731 | ### |
719 | @api_version("1.0.0") | 732 | @api_version("1.0.0") |