diff options
author | halcy <halcy@ARARAGI-KUN> | 2022-12-01 01:39:08 +0200 |
---|---|---|
committer | halcy <halcy@ARARAGI-KUN> | 2022-12-01 01:39:08 +0200 |
commit | e483d160145b1086629c1ba5a2964c5550c5c126 (patch) | |
tree | 811489bcfc67287c7ef18e10adddf7846223e79c /mastodon/endorsements.py | |
parent | b4ede028a721243c2bfc8aa9ee38ae16b71b4ada (diff) | |
download | mastodon.py-e483d160145b1086629c1ba5a2964c5550c5c126.tar.gz |
Finish moving code out into smaller files
Diffstat (limited to 'mastodon/endorsements.py')
-rw-r--r-- | mastodon/endorsements.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mastodon/endorsements.py b/mastodon/endorsements.py new file mode 100644 index 0000000..b6c27a0 --- /dev/null +++ b/mastodon/endorsements.py | |||
@@ -0,0 +1,19 @@ | |||
1 | # notifications.py - endorsement endpoints | ||
2 | |||
3 | from .versions import _DICT_VERSION_ACCOUNT | ||
4 | from .utility import api_version | ||
5 | |||
6 | from .internals import Mastodon as Internals | ||
7 | |||
8 | class Mastodon(Internals): | ||
9 | ### | ||
10 | # Reading data: Endorsements | ||
11 | ### | ||
12 | @api_version("2.5.0", "2.5.0", _DICT_VERSION_ACCOUNT) | ||
13 | def endorsements(self): | ||
14 | """ | ||
15 | Fetch list of users endorsed by the logged-in user. | ||
16 | |||
17 | Returns a list of :ref:`account dicts <account dicts>`. | ||
18 | """ | ||
19 | return self.__api_request('GET', '/api/v1/endorsements') | ||