diff options
author | Lorenz Diener <[email protected]> | 2018-04-17 15:22:07 +0200 |
---|---|---|
committer | Lorenz Diener <[email protected]> | 2018-04-17 15:22:07 +0200 |
commit | dd5f4ae08af21e5965b3670231ac92c5503f58cc (patch) | |
tree | 5b3de50ec037e46e6b74dfe0cb6dae0505e9dee9 | |
parent | 400faadc0deeb352d78291857cd6a2c8b8c528d3 (diff) | |
download | mastodon.py-dd5f4ae08af21e5965b3670231ac92c5503f58cc.tar.gz |
Document streaming error handling
-rw-r--r-- | docs/index.rst | 6 |
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 | --------- |
726 | These functions allow access to the streaming API. | 726 | These functions allow access to the streaming API. |
727 | 727 | ||
728 | If `async` is False, these methods block forever (or until an exception is raised). | 728 | If `async` is False, these methods block forever (or until an error is encountered). |
729 | 729 | ||
730 | If `async` is True, the listener will listen on another thread and these methods | 730 | If `async` is True, the listener will listen on another thread and these methods |
731 | will return a handle corresponding to the open connection. If, in addition, `async_reconnect` is True, | 731 | will 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 | |||
741 | A `CallbackStreamListener` class that allows you to specify function callbacks | 741 | A `CallbackStreamListener` class that allows you to specify function callbacks |
742 | directly is included for convenience. | 742 | directly is included for convenience. |
743 | 743 | ||
744 | When in not-async mode or async mode without async_reconnect, the stream functions may raise | ||
745 | various 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 |