2022-11-30 23:39:08 +00:00
|
|
|
# notifications.py - endorsement endpoints
|
|
|
|
|
2023-06-19 21:35:03 +00:00
|
|
|
from mastodon.versions import _DICT_VERSION_ACCOUNT
|
|
|
|
from mastodon.utility import api_version
|
2022-11-30 23:39:08 +00:00
|
|
|
|
2023-06-19 21:35:03 +00:00
|
|
|
from mastodon.internals import Mastodon as Internals
|
|
|
|
from mastodon.types import Account, NonPaginatableList
|
2023-01-02 13:39:16 +00:00
|
|
|
|
|
|
|
class Mastodon(Internals):
|
2022-11-30 23:39:08 +00:00
|
|
|
###
|
|
|
|
# Reading data: Endorsements
|
|
|
|
###
|
|
|
|
@api_version("2.5.0", "2.5.0", _DICT_VERSION_ACCOUNT)
|
2023-06-19 21:35:03 +00:00
|
|
|
def endorsements(self) -> NonPaginatableList[Account]:
|
2022-11-30 23:39:08 +00:00
|
|
|
"""
|
|
|
|
Fetch list of users endorsed by the logged-in user.
|
|
|
|
"""
|
|
|
|
return self.__api_request('GET', '/api/v1/endorsements')
|