aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'docs/09_notifications.rst')
-rw-r--r--docs/09_notifications.rst61
1 files changed, 61 insertions, 0 deletions
diff --git a/docs/09_notifications.rst b/docs/09_notifications.rst
new file mode 100644
index 0000000..cc45fdb
--- /dev/null
+++ b/docs/09_notifications.rst
@@ -0,0 +1,61 @@
1Notifications and filtering
2===========================
3.. py:module:: mastodon
4.. py:class: Mastodon
5
6Notifications
7-------------
8This function allows you to get information about a user's notifications as well as to clear all or some notifications and to mark conversations as read.
9
10Reading
11~~~~~~~
12.. automethod:: Mastodon.notifications
13
14Writing
15~~~~~~~
16.. automethod:: Mastodon.notifications_clear
17.. automethod:: Mastodon.notifications_dismiss
18.. automethod:: Mastodon.conversations_read
19
20
21Keyword filters
22---------------
23These functions allow you to get information about keyword filters as well as to create and update filters.
24
25**Very Important Note: The filtering system was revised in 4.0.0. This means that these functions will now not work anymore if an instance is on Mastodon 4.0.0 or above.
26When updating Mastodon.py for 4.0.0, we'll make an effort to emulate old behaviour, but this will not always be possible. Consider these methods deprecated, for now.**
27
28Reading
29~~~~~~~
30.. automethod:: Mastodon.filters
31.. automethod:: Mastodon.filter
32.. automethod:: Mastodon.filters_apply
33
34Writing
35~~~~~~~
36.. automethod:: Mastodon.filter_create
37.. automethod:: Mastodon.filter_update
38.. automethod:: Mastodon.filter_delete
39
40Push notifications
41------------------
42Mastodon supports the delivery of notifications via webpush.
43
44These functions allow you to manage webpush subscriptions and to decrypt received
45pushes. Note that the intended setup is not Mastodon pushing directly to a user's client -
46the push endpoint should usually be a relay server that then takes care of delivering the
47(encrypted) push to the end user via some mechanism, where it can then be decrypted and
48displayed.
49
50Mastodon allows an application to have one webpush subscription per user at a time.
51
52All crypto utilities require Mastodon.py's optional "webpush" feature dependencies
53(specifically, the "cryptography" and "http_ece" packages).
54
55.. automethod:: Mastodon.push_subscription
56.. automethod:: Mastodon.push_subscription_set
57.. automethod:: Mastodon.push_subscription_update
58
59.. _push_subscription_generate_keys():
60.. automethod:: Mastodon.push_subscription_generate_keys
61.. automethod:: Mastodon.push_subscription_decrypt_push
Powered by cgit v1.2.3 (git 2.41.0)