aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorLorenz Diener <[email protected]>2018-04-17 15:22:07 +0200
committerLorenz Diener <[email protected]>2018-04-17 15:22:07 +0200
commitdd5f4ae08af21e5965b3670231ac92c5503f58cc (patch)
tree5b3de50ec037e46e6b74dfe0cb6dae0505e9dee9 /docs
parent400faadc0deeb352d78291857cd6a2c8b8c528d3 (diff)
downloadmastodon.py-dd5f4ae08af21e5965b3670231ac92c5503f58cc.tar.gz
Document streaming error handling
Diffstat (limited to 'docs')
-rw-r--r--docs/index.rst6
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/index.rst b/docs/index.rst
index f463156..4de0f6e 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -725,7 +725,7 @@ Streaming
725--------- 725---------
726These functions allow access to the streaming API. 726These functions allow access to the streaming API.
727 727
728If `async` is False, these methods block forever (or until an exception is raised). 728If `async` is False, these methods block forever (or until an error is encountered).
729 729
730If `async` is True, the listener will listen on another thread and these methods 730If `async` is True, the listener will listen on another thread and these methods
731will return a handle corresponding to the open connection. If, in addition, `async_reconnect` is True, 731will return a handle corresponding to the open connection. If, in addition, `async_reconnect` is True,
@@ -741,6 +741,10 @@ The streaming functions take instances of `StreamListener` as the `listener` par
741A `CallbackStreamListener` class that allows you to specify function callbacks 741A `CallbackStreamListener` class that allows you to specify function callbacks
742directly is included for convenience. 742directly is included for convenience.
743 743
744When in not-async mode or async mode without async_reconnect, the stream functions may raise
745various exceptions: `MastodonMalformedEventError` if a received event cannot be parsed and
746`MastodonNetworkError` if any connection problems occur.
747
744.. automethod:: Mastodon.stream_user 748.. automethod:: Mastodon.stream_user
745.. automethod:: Mastodon.stream_public 749.. automethod:: Mastodon.stream_public
746.. automethod:: Mastodon.stream_local 750.. automethod:: Mastodon.stream_local
Powered by cgit v1.2.3 (git 2.41.0)