diff options
author | halcy <halcy@ARARAGI-KUN> | 2022-11-15 10:44:34 +0200 |
---|---|---|
committer | halcy <halcy@ARARAGI-KUN> | 2022-11-15 10:44:34 +0200 |
commit | cfcc6bccc77c4747d304ec173c93f4f9839b9012 (patch) | |
tree | 1646aeff8c3b8cdb2d42b11fbd942a2f55866a89 /docs | |
parent | 15f60dccaaa63d4435f73a60811327f46ef1e216 (diff) | |
download | mastodon.py-cfcc6bccc77c4747d304ec173c93f4f9839b9012.tar.gz |
Prep 1.6.0
Diffstat (limited to 'docs')
-rw-r--r-- | docs/conf.py | 4 | ||||
-rw-r--r-- | docs/index.rst | 17 |
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. |
69 | version = u'1.5' | 69 | version = u'1.6' |
70 | # The full version, including alpha/beta/rc tags. | 70 | # The full version, including alpha/beta/rc tags. |
71 | release = u'1.5.2' | 71 | release = 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 | |||
1307 | The function name is `on_` + the event name. If the event name contains dots, they are replaced with | 1307 | The function name is `on_` + the event name. If the event name contains dots, they are replaced with |
1308 | underscored, e.g. for an event called 'status.update' the listener function should be named `on_status_update`. | 1308 | underscored, e.g. for an event called 'status.update' the listener function should be named `on_status_update`. |
1309 | 1309 | ||
1310 | It may be that future Mastodon versions will come with completely new (unknown) event names. In this | 1310 | It may be that future Mastodon versions will come with completely new (unknown) event names. |
1311 | case a (deprecated) Mastodon.py would throw an error. If you want to avoid this in general, you can | 1311 | If you want to do something when such an event is received, override the listener function `on_unknown_event`. |
1312 | override the listener function `on_unknown_event`. This has an additional parameter `name` which informs | 1312 | This has an additional parameter `name` which informs about the name of the event. `unknown_event` contains the |
1313 | about the name of the event. `unknown_event` contains the content of the event. | 1313 | content of the event. Alternatively, a callback function can be passed in the `unknown_event_handler` parameter |
1314 | 1314 | in the `CallbackStreamListener` constructor. | |
1315 | Alternatively, a callback function can be passed in the `unknown_event_handler` parameter in the | 1315 | |
1316 | `CallbackStreamListener` constructor. | 1316 | Note that the `unknown_event` handler is *not* guaranteed to receive events once they have been implemented. |
1317 | Events will only go to this handler temporarily, while Mastodon.py has not been updated. Changes to what events | ||
1318 | do and do not go into the handler will not be considered a breaking change. If you want to handle a new event whose | ||
1319 | name you _do_ know, define an appropriate handler in your StreamListener, which will work even if it is not listed here. | ||
1317 | 1320 | ||
1318 | When in not-async mode or async mode without async_reconnect, the stream functions may raise | 1321 | When in not-async mode or async mode without async_reconnect, the stream functions may raise |
1319 | various exceptions: `MastodonMalformedEventError` if a received event cannot be parsed and | 1322 | various exceptions: `MastodonMalformedEventError` if a received event cannot be parsed and |