From 5215c2242dd7b87418a7c10781c2b10b35d86f46 Mon Sep 17 00:00:00 2001 From: halcy Date: Sun, 13 Nov 2022 18:39:56 +0200 Subject: Fix some things in streaming and admin API for 3.3.0 support --- docs/index.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/index.rst b/docs/index.rst index 9083fc9..e555912 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1305,9 +1305,8 @@ A `CallbackStreamListener` class that allows you to specify function callbacks directly is included for convenience. For new well-known events implement the streaming function in `StreamListener` or `CallbackStreamListener`. -The function name is `on_` + the event name. If the event-name contains dots, use an underscore instead. - -E.g. for `'status.update'` the listener function should be named as `on_status_update`. +The function name is `on_` + the event name. If the event name contains dots, they are replaced with +underscored, e.g. for an event called 'status.update' the listener function should be named `on_status_update`. It may be that future Mastodon versions will come with completely new (unknown) event names. In this case a (deprecated) Mastodon.py would throw an error. If you want to avoid this in general, you can @@ -1336,6 +1335,7 @@ StreamListener .. automethod:: StreamListener.on_notification .. automethod:: StreamListener.on_delete .. automethod:: StreamListener.on_conversation +.. automethod:: StreamListener.on_status_update .. automethod:: StreamListener.on_unknown_event .. automethod:: StreamListener.on_abort .. automethod:: StreamListener.handle_heartbeat -- cgit v1.2.3