Changed version

This commit is contained in:
spla 2022-09-21 22:47:52 +02:00
pare b53ab9d358
commit 75d5a5cba4
S'han modificat 2 arxius amb 15 adicions i 15 eliminacions

Veure arxiu

@ -1,5 +1,5 @@
# Mastodonplus.py
Fork of Python wrapper for the Mastodon (<https://github.com/tootsuite/mastodon/> ) API.
Fork of Python wrapper for the Mastodon (https://github.com/mastodon/mastodon) API.
The goal of this fork is to add all 'new' Mastodon API's endpoints to the excellent [halcy's wrapper](https://github.com/halcy/Mastodon.py).
#### Register your app! This only needs to be done once. Uncomment the code and substitute in your information.
@ -47,11 +47,11 @@ pip3 install Mastodonplus.py
```
#### New features
* 26.8.2022. Mastodon v3.5.x. Added New endpoints: /api/v1/admin/domain_blocks (list,show by id, delete and create)
* 26.8.2022. Mastodon v3.6.0. Added New endpoints: /api/v1/admin/domain_blocks (list,show by id, delete and create)
* 27.8.2022. Mastodon v3.1.4. Added 'remote" param to GET /api/v1/timelines/public REST API
* 27.8.2022. Mastodon v3.1.4. Added GET /api/v1/streaming/public/remote (Mastodon.stream_remote())
* 06.9.2022. Mastodon v3.2.0. Added POST /api/v1/accounts/:account_id/note with comment param. (Mastodon.accounts_note(id=account_id, comment='comment')
* 06.9.2022. Mastodon v3.5.x. Added GET /api/v1/admin/ip_blocks (Mastodon.admin_ip_blocks_list(max_id=None, min_id=None, since_id=None, limit=None)
* 06.9.2022. Mastodon v3.5.x. Added DELETE /api/v1/admin/ip_blocks/:id (Mastodon.admin_ip_blocks_delete(id=None)
* 06.9.2022. Mastodon v3.5.x. Added POST /api/v1/admin/ip_blocks (Mastodon.admin_ip_blocks_create(self, ip=None, severity=None, comment=None, expires_in=None)
* 06.9.2022. Mastodon v3.6.0. Added GET /api/v1/admin/ip_blocks (Mastodon.admin_ip_blocks_list(max_id=None, min_id=None, since_id=None, limit=None)
* 06.9.2022. Mastodon v3.6.0. Added DELETE /api/v1/admin/ip_blocks/:id (Mastodon.admin_ip_blocks_delete(id=None)
* 06.9.2022. Mastodon v3.6.0. Added POST /api/v1/admin/ip_blocks (Mastodon.admin_ip_blocks_create(self, ip=None, severity=None, comment=None, expires_in=None)
severity possible values are: sign_up_requires_approval, sign_up_block, no_access

Veure arxiu

@ -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.