|
|
|
@ -239,8 +239,8 @@ class Mastodon:
|
|
|
|
|
__DICT_VERSION_MARKER = "3.0.0"
|
|
|
|
|
__DICT_VERSION_REACTION = "3.1.0"
|
|
|
|
|
__DICT_VERSION_ANNOUNCEMENT = bigger_version("3.1.0", __DICT_VERSION_REACTION)
|
|
|
|
|
__DICT_VERSION_DOMAIN_BLOCKS = "3.5.3"
|
|
|
|
|
__DICT_VERSION_IP_BLOCKS = "3.5.3"
|
|
|
|
|
__DICT_VERSION_DOMAIN_BLOCKS = "3.6.0"
|
|
|
|
|
__DICT_VERSION_IP_BLOCKS = "3.6.0"
|
|
|
|
|
|
|
|
|
|
###
|
|
|
|
|
# Registering apps
|
|
|
|
@ -1198,7 +1198,7 @@ class Mastodon:
|
|
|
|
|
url = '/api/v1/accounts/{0}/lists'.format(str(id))
|
|
|
|
|
return self.__api_request('GET', url, params)
|
|
|
|
|
|
|
|
|
|
@api_version("3.5.3", "3.5.3", __DICT_VERSION_LIST)
|
|
|
|
|
@api_version("3.6.0", "3.6.0", __DICT_VERSION_LIST)
|
|
|
|
|
def accounts_note(self, id, comment=None):
|
|
|
|
|
"""
|
|
|
|
|
Add personal notes for accounts
|
|
|
|
@ -2995,14 +2995,14 @@ class Mastodon:
|
|
|
|
|
id = self.__unpack_id(id)
|
|
|
|
|
return self.__api_request('POST', '/api/v1/admin/reports/{0}/resolve'.format(id))
|
|
|
|
|
|
|
|
|
|
@api_version("3.5.3", "3.5.3", __DICT_VERSION_DOMAIN_BLOCKS)
|
|
|
|
|
@api_version("3.6.0", "3.6.0", __DICT_VERSION_DOMAIN_BLOCKS)
|
|
|
|
|
def admin_domain_blocks_list(self):
|
|
|
|
|
"""
|
|
|
|
|
List domain blocks.
|
|
|
|
|
"""
|
|
|
|
|
return self.__api_request('GET', '/api/v1/admin/domain_blocks')
|
|
|
|
|
|
|
|
|
|
@api_version("3.5.3", "3.5.3", __DICT_VERSION_DOMAIN_BLOCKS)
|
|
|
|
|
@api_version("3.6.0", "3.6.0", __DICT_VERSION_DOMAIN_BLOCKS)
|
|
|
|
|
def admin_domain_blocks(self, id):
|
|
|
|
|
"""
|
|
|
|
|
Shows one domain block by id.
|
|
|
|
@ -3010,7 +3010,7 @@ class Mastodon:
|
|
|
|
|
id = self.__unpack_id(id)
|
|
|
|
|
return self.__api_request('GET', '/api/v1/admin/domain_blocks/{0}'.format(id))
|
|
|
|
|
|
|
|
|
|
@api_version("3.5.3", "3.5.3", __DICT_VERSION_DOMAIN_BLOCKS)
|
|
|
|
|
@api_version("3.6.0", "3.6.0", __DICT_VERSION_DOMAIN_BLOCKS)
|
|
|
|
|
def admin_domain_blocks_delete(self, id):
|
|
|
|
|
"""
|
|
|
|
|
Delete one domain block by id.
|
|
|
|
@ -3018,7 +3018,7 @@ class Mastodon:
|
|
|
|
|
id = self.__unpack_id(id)
|
|
|
|
|
return self.__api_request('DELETE', '/api/v1/admin/domain_blocks/{0}'.format(id))
|
|
|
|
|
|
|
|
|
|
@api_version("3.5.3", "3.5.3", __DICT_VERSION_DOMAIN_BLOCKS)
|
|
|
|
|
@api_version("3.6.0", "3.6.0", __DICT_VERSION_DOMAIN_BLOCKS)
|
|
|
|
|
def admin_domain_blocks_create(self, domain=None, severity=None, reject_media=None, reject_reports=None, private_comment=None, public_comment=None, obfuscate=None):
|
|
|
|
|
"""
|
|
|
|
|
To create a new domain block.
|
|
|
|
@ -3039,7 +3039,7 @@ class Mastodon:
|
|
|
|
|
params = self.__generate_params(locals())
|
|
|
|
|
return self.__api_request('POST', '/api/v1/admin/domain_blocks', params)
|
|
|
|
|
|
|
|
|
|
@api_version("3.5.3", "3.5.3", __DICT_VERSION_IP_BLOCKS)
|
|
|
|
|
@api_version("3.6.0", "3.6.0", __DICT_VERSION_IP_BLOCKS)
|
|
|
|
|
def admin_ip_blocks_list(self, max_id=None, min_id=None, since_id=None, limit=None):
|
|
|
|
|
"""
|
|
|
|
|
List IP blocks.
|
|
|
|
@ -3059,7 +3059,7 @@ class Mastodon:
|
|
|
|
|
|
|
|
|
|
return self.__api_request('GET', '/api/v1/admin/ip_blocks', params)
|
|
|
|
|
|
|
|
|
|
@api_version("3.5.3", "3.5.3", __DICT_VERSION_IP_BLOCKS)
|
|
|
|
|
@api_version("3.6.0", "3.6.0", __DICT_VERSION_IP_BLOCKS)
|
|
|
|
|
def admin_ip_blocks_delete(self, id):
|
|
|
|
|
"""
|
|
|
|
|
Delete one IP block by id.
|
|
|
|
@ -3067,7 +3067,7 @@ class Mastodon:
|
|
|
|
|
id = self.__unpack_id(id)
|
|
|
|
|
return self.__api_request('DELETE', '/api/v1/admin/ip_blocks/{0}'.format(id))
|
|
|
|
|
|
|
|
|
|
@api_version("3.5.3", "3.5.3", __DICT_VERSION_IP_BLOCKS)
|
|
|
|
|
@api_version("3.6.0", "3.6.0", __DICT_VERSION_IP_BLOCKS)
|
|
|
|
|
def admin_ip_blocks_create(self, ip=None, severity=None, comment=None, expires_in=None):
|
|
|
|
|
"""
|
|
|
|
|
To create a new IP block.
|
|
|
|
|