From 75aebac744717216118afcdb89c96cfe8856e9ef Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Wed, 13 Dec 2017 17:17:42 +0100 Subject: Add custom_emojis --- docs/index.rst | 5 +++++ mastodon/Mastodon.py | 13 +++++++++++++ 2 files changed, 18 insertions(+) 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 .. automethod:: Mastodon.domain_blocks +Reading data: Emoji +------------------- + +.. automethod:: Mastodon.custom_emojis + Writing data: Statuses ---------------------- 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 @@ -713,6 +713,19 @@ class Mastodon: params = self.__generate_params(locals()) return self.__api_request('GET', '/api/v1/domain_blocks', params) + ### + # Reading data: Emoji + ### + @api_version("2.1.0") + def custom_emojis(self): + """ + Fetch the list of custom emoji the instance has installed. + + Returns a list of emoji dicts. + + """ + return self.__api_request('GET', '/api/v1/custom_emojis') + ### # Writing data: Statuses ### -- cgit v1.2.3