Fix streaming docs

pull/339/head
halcy 2023-04-23 19:21:43 +03:00
rodzic 137cf49435
commit 345e8c35c0
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -24,6 +24,9 @@ class Mastodon(Internals):
def stream_public(self, listener, run_async=False, timeout=_DEFAULT_STREAM_TIMEOUT, reconnect_async=False, reconnect_async_wait_sec=_DEFAULT_STREAM_RECONNECT_WAIT_SEC, local=False, remote=False): def stream_public(self, listener, run_async=False, timeout=_DEFAULT_STREAM_TIMEOUT, reconnect_async=False, reconnect_async_wait_sec=_DEFAULT_STREAM_RECONNECT_WAIT_SEC, local=False, remote=False):
""" """
Streams public events. Streams public events.
Set `local` to True to only get local statuses.
Set `remote` to True to only get remote statuses.
""" """
base = '/api/v1/streaming/public' base = '/api/v1/streaming/public'
if local: if local:
@ -50,7 +53,7 @@ class Mastodon(Internals):
Stream for all public statuses for the hashtag 'tag' seen by the connected Stream for all public statuses for the hashtag 'tag' seen by the connected
instance. instance.
Set local to True to only get local statuses. Set `local` to True to only get local statuses.
""" """
if tag.startswith("#"): if tag.startswith("#"):
raise MastodonIllegalArgumentError("Tag parameter should omit leading #") raise MastodonIllegalArgumentError("Tag parameter should omit leading #")