Addet GET /api/v1/streaming/public/remote (Mastodon.stream_remote(). Mastodon v3.1.4)

This commit is contained in:
spla 2022-08-27 19:08:02 +02:00
pare 220c2a7069
commit 05744034b8
S'han modificat 3 arxius amb 18 adicions i 9 eliminacions

Veure arxiu

@ -48,4 +48,5 @@ pip3 install Mastodonplus.py
#### New features
* 26.8.2022. 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 '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())

Veure arxiu

@ -798,15 +798,15 @@ class Mastodon:
"""
if max_id != None:
max_id = self.__unpack_id(max_id)
if min_id != None:
min_id = self.__unpack_id(min_id)
if since_id != None:
since_id = self.__unpack_id(since_id)
params_initial = locals()
if only_media == False:
del params_initial['only_media']
@ -815,7 +815,7 @@ class Mastodon:
url = '/api/v1/timelines/public'
params = self.__generate_params(params_initial)
return self.__api_request('GET', url, params)
@api_version("1.0.0", "2.6.0", __DICT_VERSION_STATUS)
@ -3217,6 +3217,14 @@ class Mastodon:
"""
return self.__stream('/api/v1/streaming/public/local', listener, run_async=run_async, timeout=timeout, reconnect_async=reconnect_async, reconnect_async_wait_sec=reconnect_async_wait_sec)
@api_version("1.1.0", "1.4.2", __DICT_VERSION_STATUS)
def stream_remote(self, listener, run_async=False, timeout=__DEFAULT_STREAM_TIMEOUT, reconnect_async=False, reconnect_async_wait_sec=__DEFAULT_STREAM_RECONNECT_WAIT_SEC):
"""
Streams remote public events.
"""
return self.__stream('/api/v1/streaming/public/remote', listener, run_async=run_async, timeout=timeout, reconnect_async=reconnect_async, reconnect_async_wait_sec=reconnect_async_wait_sec)
@api_version("1.1.0", "1.4.2", __DICT_VERSION_STATUS)
def stream_hashtag(self, tag, listener, local=False, run_async=False, timeout=__DEFAULT_STREAM_TIMEOUT, reconnect_async=False, reconnect_async_wait_sec=__DEFAULT_STREAM_RECONNECT_WAIT_SEC):
"""

Veure arxiu

@ -1,6 +1,6 @@
import setuptools
VERSION = '1.5.5.1'
VERSION = '1.5.5.2'
test_deps = [
'pytest',
@ -27,7 +27,7 @@ extras = {
"blurhash": blurhash_deps,
}
with open('README.rst', 'r', encoding='utf-8') as fh:
with open('README.md', 'r', encoding='utf-8') as fh:
long_description = fh.read()
setuptools.setup(
@ -47,7 +47,7 @@ setuptools.setup(
] + blurhash_deps,
tests_require=test_deps,
extras_require=extras,
url='https://git.mastodont.cat/spla/Mastodon.py',
url='https://git.mastodont.cat/spla/Mastodonplus.py',
author='Lorenz Diener',
author_email='lorenzd+mastodonpypypi@gmail.com',
license='MIT',