Added spoiler text support
This commit is contained in:
pare
857968f34e
commit
f734a45fb6
S'han modificat 2 arxius amb 7 adicions i 2 eliminacions
|
@ -108,7 +108,7 @@ Toot dicts
|
||||||
mastodon.toot("Hello from Python")
|
mastodon.toot("Hello from Python")
|
||||||
# Returns the following dictionary:
|
# 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
|
'created_at': Creation time
|
||||||
'mentions': A list of account dicts mentioned in the toot
|
'mentions': A list of account dicts mentioned in the toot
|
||||||
'uri': Descriptor for the toot
|
'uri': Descriptor for the toot
|
||||||
|
@ -123,6 +123,7 @@ Toot dicts
|
||||||
'reblog': Denotes whether the toot is a reblog
|
'reblog': Denotes whether the toot is a reblog
|
||||||
'url': URL of the toot
|
'url': URL of the toot
|
||||||
'content': Content of the toot, as HTML: '<p>Hello from Python</p>'
|
'content': Content of the toot, as HTML: '<p>Hello from Python</p>'
|
||||||
|
'spoiler_text': Warning text that should be displayed before the toot content
|
||||||
'favourited': Denotes whether the logged in user has favourited this toot
|
'favourited': Denotes whether the logged in user has favourited this toot
|
||||||
'account': Account dict for the logged in account
|
'account': Account dict for the logged in account
|
||||||
}
|
}
|
||||||
|
|
|
@ -318,7 +318,7 @@ class Mastodon:
|
||||||
###
|
###
|
||||||
# Writing data: Statuses
|
# 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
|
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
|
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
|
If not passed in, visibility defaults to match the current account's
|
||||||
privacy setting (private if the account is locked, public otherwise).
|
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.
|
Returns a toot dict with the new status.
|
||||||
"""
|
"""
|
||||||
params_initial = locals()
|
params_initial = locals()
|
||||||
|
|
Loading…
Referencia en una nova incidència