From 67824478afe41aabb8802efd632fb653dd6e834a Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Sun, 28 Apr 2019 00:07:04 +0200 Subject: implement app_verify_credentials, document entity change --- docs/index.rst | 1 + mastodon/Mastodon.py | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index 561af0b..55335b6 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -374,6 +374,7 @@ Application dicts { 'name': # The applications name 'website': # The applications website + 'vapid_key': # A vapid key that can be used in web applications } diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index 4b40b5b..abd6b42 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py @@ -158,7 +158,7 @@ class Mastodon: __SUPPORTED_MASTODON_VERSION = "2.4.3" # Dict versions - __DICT_VERSION_APPLICATION = "1.0.0" + __DICT_VERSION_APPLICATION = "2.7.2" __DICT_VERSION_MENTION = "1.0.0" __DICT_VERSION_MEDIA = "2.3.0" __DICT_VERSION_ACCOUNT = "2.4.0" @@ -1166,6 +1166,19 @@ class Mastodon: """ return self.__api_request('GET', '/api/v1/custom_emojis') + ### + # Reading data: Apps + ### + @api_version("2.0.0", "2.7.2", __DICT_VERSION_APPLICATION) + def app_verify_credentials(self): + """ + Fetch information about the current application. + + Returns an `application dict`_. + + """ + return self.__api_request('GET', '/api/v1/apps/verify_credentials') + ### # Reading data: Webpush subscriptions ### -- cgit v1.2.3