aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorLorenz Diener <[email protected]>2019-04-28 21:53:01 +0200
committerLorenz Diener <[email protected]>2019-04-28 21:53:01 +0200
commit3eba3f8835f25800f37b9da18a09429b084effa0 (patch)
tree112470e2ce3e07775c8963d7373892cbb8576058 /docs
parent66524ad4df9dcff3cee3a6d6bfc198e50ce310e1 (diff)
downloadmastodon.py-3eba3f8835f25800f37b9da18a09429b084effa0.tar.gz
Add preferences endpoint
Diffstat (limited to 'docs')
-rw-r--r--docs/index.rst27
1 files changed, 26 insertions, 1 deletions
diff --git a/docs/index.rst b/docs/index.rst
index d6d0d04..a98eb23 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -335,7 +335,7 @@ Scheduled toot dicts
335 335
336.. code-block:: python 336.. code-block:: python
337 337
338 api2.status_post("text", scheduled_at=the_future) 338 mastodon.status_post("text", scheduled_at=the_future)
339 # Returns the following dictionary: 339 # Returns the following dictionary:
340 { 340 {
341 'id': # Scheduled toot ID (note: Not the id of the toot once it gets posted!) 341 'id': # Scheduled toot ID (note: Not the id of the toot once it gets posted!)
@@ -693,6 +693,26 @@ Push notification dicts
693 'title': # Title for the notification 693 'title': # Title for the notification
694 } 694 }
695 695
696Preference dicts
697~~~~~~~~~~~~~~~~
698.. _preference dict:
699
700.. code-block:: python
701
702 mastodon.preferences()
703 # Returns the following dictionary
704 {
705 'posting:default:visibility': # The default visibility setting for the users posts,
706 # as a string
707 'posting:default:sensitive': # Boolean indicating whether the users uploads should
708 # be marked sensitive by default
709 'posting:default:language': # The users default post language, if set (None if not)
710 'reading:expand:media': # How the user wishes to be shown sensitive media. Can be
711 # 'default' (hide if sensitive), 'hide_all' or 'show_all'
712 'reading:expand:spoilers': # Boolean indicating whether the user wishes to expand
713 # content warnings by default
714 }
715
696App registration and user authentication 716App registration and user authentication
697---------------------------------------- 717----------------------------------------
698Before you can use the mastodon API, you have to register your 718Before you can use the mastodon API, you have to register your
@@ -878,6 +898,11 @@ Reading data: Endorsements
878 898
879.. automethod:: Mastodon.endorsements 899.. automethod:: Mastodon.endorsements
880 900
901Reading data: Preferences
902--------------------------
903
904.. automethod:: Mastodon.preferences
905
881 906
882Writing data: Statuses 907Writing data: Statuses
883---------------------- 908----------------------
Powered by cgit v1.2.3 (git 2.41.0)