diff options
author | halcy <halcy@ARARAGI-KUN> | 2022-11-29 00:50:02 +0200 |
---|---|---|
committer | halcy <halcy@ARARAGI-KUN> | 2022-11-29 00:50:02 +0200 |
commit | 43c7d7ceb8da17954aedee96bd6fb5444a4a728c (patch) | |
tree | bb7cdad59a16447841adc15cb047202b47661220 /docs/09_notifications.rst | |
parent | bd3db974d771d753e7732fabe6a050b779c466e2 (diff) | |
download | mastodon.py-43c7d7ceb8da17954aedee96bd6fb5444a4a728c.tar.gz |
Restructure the docs, a lot
Diffstat (limited to 'docs/09_notifications.rst')
-rw-r--r-- | docs/09_notifications.rst | 61 |
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 @@ | |||
1 | Notifications and filtering | ||
2 | =========================== | ||
3 | .. py:module:: mastodon | ||
4 | .. py:class: Mastodon | ||
5 | |||
6 | Notifications | ||
7 | ------------- | ||
8 | This 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 | |||
10 | Reading | ||
11 | ~~~~~~~ | ||
12 | .. automethod:: Mastodon.notifications | ||
13 | |||
14 | Writing | ||
15 | ~~~~~~~ | ||
16 | .. automethod:: Mastodon.notifications_clear | ||
17 | .. automethod:: Mastodon.notifications_dismiss | ||
18 | .. automethod:: Mastodon.conversations_read | ||
19 | |||
20 | |||
21 | Keyword filters | ||
22 | --------------- | ||
23 | These 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. | ||
26 | When 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 | |||
28 | Reading | ||
29 | ~~~~~~~ | ||
30 | .. automethod:: Mastodon.filters | ||
31 | .. automethod:: Mastodon.filter | ||
32 | .. automethod:: Mastodon.filters_apply | ||
33 | |||
34 | Writing | ||
35 | ~~~~~~~ | ||
36 | .. automethod:: Mastodon.filter_create | ||
37 | .. automethod:: Mastodon.filter_update | ||
38 | .. automethod:: Mastodon.filter_delete | ||
39 | |||
40 | Push notifications | ||
41 | ------------------ | ||
42 | Mastodon supports the delivery of notifications via webpush. | ||
43 | |||
44 | These functions allow you to manage webpush subscriptions and to decrypt received | ||
45 | pushes. Note that the intended setup is not Mastodon pushing directly to a user's client - | ||
46 | the 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 | ||
48 | displayed. | ||
49 | |||
50 | Mastodon allows an application to have one webpush subscription per user at a time. | ||
51 | |||
52 | All 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 | ||