aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorLorenz Diener <[email protected]>2018-06-05 17:19:15 +0200
committerLorenz Diener <[email protected]>2018-06-05 17:19:15 +0200
commitcaba9c5467fb66fb722d6ebc94190ed093fc9d6a (patch)
tree53e8805a3d690c56a86876d3c6181ebf7cb7fb28 /docs
parent4b747886b918d3da91f62b2ba7f7bc4aa142cf79 (diff)
downloadmastodon.py-caba9c5467fb66fb722d6ebc94190ed093fc9d6a.tar.gz
Add notif dict docs
Diffstat (limited to 'docs')
-rw-r--r--docs/index.rst20
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/index.rst b/docs/index.rst
index 4d7073c..56e0756 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -546,6 +546,26 @@ Push subscription dicts
546 # if webpushes have been requested for those events. 546 # if webpushes have been requested for those events.
547 } 547 }
548 548
549Push notification dicts
550~~~~~~~~~~~~~~~~~~~~~~~
551.. _push notification dict:
552
553.. code-block:: python
554
555 mastodon.push_subscription_decrypt_push(...)
556 # Returns the following dictionary
557 {
558 'access_token': # Access token that can be used to access the API as the
559 # notified user
560 'body': # Text body of the notification
561 'icon': # URL to an icon for the notification
562 'notification_id': # ID that can be passed to notification() to get the full
563 # notification object,
564 'notification_type': # 'mention', 'reblog', 'follow' or 'favourite'
565 'preferred_locale': # The users preferred locale
566 'title': # Title for the notification
567 }
568
549App registration and user authentication 569App registration and user authentication
550---------------------------------------- 570----------------------------------------
551Before you can use the mastodon API, you have to register your 571Before you can use the mastodon API, you have to register your
Powered by cgit v1.2.3 (git 2.41.0)