diff --git a/docs/index.rst b/docs/index.rst index 121dc83..39af190 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -108,7 +108,7 @@ Toot dicts mastodon.toot("Hello from Python") # Returns the following dictionary: { - 'sensitive': Denotes whether the toot is marked sensitive + 'sensitive': Denotes whether media attachments to the toot are marked sensitive 'created_at': Creation time 'mentions': A list of account dicts mentioned in the toot 'uri': Descriptor for the toot @@ -123,6 +123,7 @@ Toot dicts 'reblog': Denotes whether the toot is a reblog 'url': URL of the toot 'content': Content of the toot, as HTML: '

Hello from Python

' + 'spoiler_text': Warning text that should be displayed before the toot content 'favourited': Denotes whether the logged in user has favourited this toot 'account': Account dict for the logged in account } diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index b9ab05b..1d0e69f 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py @@ -318,7 +318,7 @@ class Mastodon: ### # Writing data: Statuses ### - def status_post(self, status, in_reply_to_id = None, media_ids = None, sensitive = False, visibility = ''): + def status_post(self, status, in_reply_to_id = None, media_ids = None, sensitive = False, visibility = '', spoiler_text = None): """ Post a status. Can optionally be in reply to another status and contain up to four pieces of media (Uploaded via media_post()). media_ids can @@ -338,6 +338,10 @@ class Mastodon: If not passed in, visibility defaults to match the current account's privacy setting (private if the account is locked, public otherwise). + The spoiler_text parameter is a string to be shown as a warning before + the text of the status. If no text is passed in, no warning will be + displayed. + Returns a toot dict with the new status. """ params_initial = locals()