aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/conf.py4
-rw-r--r--docs/index.rst17
2 files changed, 12 insertions, 9 deletions
diff --git a/docs/conf.py b/docs/conf.py
index ac8858f..306563e 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -66,9 +66,9 @@ author = u'Lorenz Diener'
66# built documents. 66# built documents.
67# 67#
68# The short X.Y version. 68# The short X.Y version.
69version = u'1.5' 69version = u'1.6'
70# The full version, including alpha/beta/rc tags. 70# The full version, including alpha/beta/rc tags.
71release = u'1.5.2' 71release = u'1.6.0'
72 72
73# The language for content autogenerated by Sphinx. Refer to documentation 73# The language for content autogenerated by Sphinx. Refer to documentation
74# for a list of supported languages. 74# for a list of supported languages.
diff --git a/docs/index.rst b/docs/index.rst
index 025896d..7fc59d2 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -1307,13 +1307,16 @@ For new well-known events implement the streaming function in `StreamListener` o
1307The function name is `on_` + the event name. If the event name contains dots, they are replaced with 1307The function name is `on_` + the event name. If the event name contains dots, they are replaced with
1308underscored, e.g. for an event called 'status.update' the listener function should be named `on_status_update`. 1308underscored, e.g. for an event called 'status.update' the listener function should be named `on_status_update`.
1309 1309
1310It may be that future Mastodon versions will come with completely new (unknown) event names. In this 1310It may be that future Mastodon versions will come with completely new (unknown) event names.
1311case a (deprecated) Mastodon.py would throw an error. If you want to avoid this in general, you can 1311If you want to do something when such an event is received, override the listener function `on_unknown_event`.
1312override the listener function `on_unknown_event`. This has an additional parameter `name` which informs 1312This has an additional parameter `name` which informs about the name of the event. `unknown_event` contains the
1313about the name of the event. `unknown_event` contains the content of the event. 1313content of the event. Alternatively, a callback function can be passed in the `unknown_event_handler` parameter
1314 1314in the `CallbackStreamListener` constructor.
1315Alternatively, a callback function can be passed in the `unknown_event_handler` parameter in the 1315
1316`CallbackStreamListener` constructor. 1316Note that the `unknown_event` handler is *not* guaranteed to receive events once they have been implemented.
1317Events will only go to this handler temporarily, while Mastodon.py has not been updated. Changes to what events
1318do and do not go into the handler will not be considered a breaking change. If you want to handle a new event whose
1319name you _do_ know, define an appropriate handler in your StreamListener, which will work even if it is not listed here.
1317 1320
1318When in not-async mode or async mode without async_reconnect, the stream functions may raise 1321When in not-async mode or async mode without async_reconnect, the stream functions may raise
1319various exceptions: `MastodonMalformedEventError` if a received event cannot be parsed and 1322various exceptions: `MastodonMalformedEventError` if a received event cannot be parsed and
Powered by cgit v1.2.3 (git 2.41.0)