From 3eba3f8835f25800f37b9da18a09429b084effa0 Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Sun, 28 Apr 2019 21:53:01 +0200 Subject: Add preferences endpoint --- docs/index.rst | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'docs') 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 .. code-block:: python - api2.status_post("text", scheduled_at=the_future) + mastodon.status_post("text", scheduled_at=the_future) # Returns the following dictionary: { 'id': # Scheduled toot ID (note: Not the id of the toot once it gets posted!) @@ -693,6 +693,26 @@ Push notification dicts 'title': # Title for the notification } +Preference dicts +~~~~~~~~~~~~~~~~ +.. _preference dict: + +.. code-block:: python + + mastodon.preferences() + # Returns the following dictionary + { + 'posting:default:visibility': # The default visibility setting for the users posts, + # as a string + 'posting:default:sensitive': # Boolean indicating whether the users uploads should + # be marked sensitive by default + 'posting:default:language': # The users default post language, if set (None if not) + 'reading:expand:media': # How the user wishes to be shown sensitive media. Can be + # 'default' (hide if sensitive), 'hide_all' or 'show_all' + 'reading:expand:spoilers': # Boolean indicating whether the user wishes to expand + # content warnings by default + } + App registration and user authentication ---------------------------------------- Before you can use the mastodon API, you have to register your @@ -878,6 +898,11 @@ Reading data: Endorsements .. automethod:: Mastodon.endorsements +Reading data: Preferences +-------------------------- + +.. automethod:: Mastodon.preferences + Writing data: Statuses ---------------------- -- cgit v1.2.3