diff options
author | Lorenz Diener <[email protected]> | 2019-04-28 00:07:04 +0200 |
---|---|---|
committer | Lorenz Diener <[email protected]> | 2019-04-28 00:07:04 +0200 |
commit | 67824478afe41aabb8802efd632fb653dd6e834a (patch) | |
tree | 239d74afdf18e13f179a7d2170801c87b0b9cd26 | |
parent | 798f243af29426d3b04c41cd0231de756b3afb4b (diff) | |
download | mastodon.py-67824478afe41aabb8802efd632fb653dd6e834a.tar.gz |
implement app_verify_credentials, document entity change
-rw-r--r-- | docs/index.rst | 1 | ||||
-rw-r--r-- | mastodon/Mastodon.py | 15 |
2 files changed, 15 insertions, 1 deletions
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 | |||
374 | { | 374 | { |
375 | 'name': # The applications name | 375 | 'name': # The applications name |
376 | 'website': # The applications website | 376 | 'website': # The applications website |
377 | 'vapid_key': # A vapid key that can be used in web applications | ||
377 | } | 378 | } |
378 | 379 | ||
379 | 380 | ||
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: | |||
158 | __SUPPORTED_MASTODON_VERSION = "2.4.3" | 158 | __SUPPORTED_MASTODON_VERSION = "2.4.3" |
159 | 159 | ||
160 | # Dict versions | 160 | # Dict versions |
161 | __DICT_VERSION_APPLICATION = "1.0.0" | 161 | __DICT_VERSION_APPLICATION = "2.7.2" |
162 | __DICT_VERSION_MENTION = "1.0.0" | 162 | __DICT_VERSION_MENTION = "1.0.0" |
163 | __DICT_VERSION_MEDIA = "2.3.0" | 163 | __DICT_VERSION_MEDIA = "2.3.0" |
164 | __DICT_VERSION_ACCOUNT = "2.4.0" | 164 | __DICT_VERSION_ACCOUNT = "2.4.0" |
@@ -1167,6 +1167,19 @@ class Mastodon: | |||
1167 | return self.__api_request('GET', '/api/v1/custom_emojis') | 1167 | return self.__api_request('GET', '/api/v1/custom_emojis') |
1168 | 1168 | ||
1169 | ### | 1169 | ### |
1170 | # Reading data: Apps | ||
1171 | ### | ||
1172 | @api_version("2.0.0", "2.7.2", __DICT_VERSION_APPLICATION) | ||
1173 | def app_verify_credentials(self): | ||
1174 | """ | ||
1175 | Fetch information about the current application. | ||
1176 | |||
1177 | Returns an `application dict`_. | ||
1178 | |||
1179 | """ | ||
1180 | return self.__api_request('GET', '/api/v1/apps/verify_credentials') | ||
1181 | |||
1182 | ### | ||
1170 | # Reading data: Webpush subscriptions | 1183 | # Reading data: Webpush subscriptions |
1171 | ### | 1184 | ### |
1172 | @api_version("2.4.0", "2.4.0", __DICT_VERSION_PUSH) | 1185 | @api_version("2.4.0", "2.4.0", __DICT_VERSION_PUSH) |