aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Piesche <[email protected]>2017-01-23 09:57:13 +0000
committerFlorian Piesche <[email protected]>2017-01-23 11:11:55 +0000
commitf60ff60e137ffb9a8e17cbda075453136d965b8c (patch)
treee83c7576408ff9e8683bbb385397018395b022e2 /mastodon
parentca72faea54f4c4a978b023e95c1f03fa7569737e (diff)
downloadmastodon.py-f60ff60e137ffb9a8e17cbda075453136d965b8c.tar.gz
Add support for sensitive toots and visibility settings.
Diffstat (limited to 'mastodon')
-rw-r--r--mastodon/Mastodon.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index 7cbdcc4..785adca 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -318,7 +318,7 @@ class Mastodon:
318 ### 318 ###
319 # Writing data: Statuses 319 # Writing data: Statuses
320 ### 320 ###
321 def status_post(self, status, in_reply_to_id = None, media_ids = None): 321 def status_post(self, status, in_reply_to_id = None, media_ids = None, sensitive = False, visibility = "public"):
322 """ 322 """
323 Post a status. Can optionally be in reply to another status and contain 323 Post a status. Can optionally be in reply to another status and contain
324 up to four pieces of media (Uploaded via media_post()). media_ids can 324 up to four pieces of media (Uploaded via media_post()). media_ids can
@@ -341,17 +341,17 @@ class Mastodon:
341 raise MastodonIllegalArgumentError("Invalid media dict.") 341 raise MastodonIllegalArgumentError("Invalid media dict.")
342 342
343 params_initial["media_ids"] = media_ids_proper 343 params_initial["media_ids"] = media_ids_proper
344 344
345 params = self.__generate_params(params_initial) 345 params = self.__generate_params(params_initial)
346 return self.__api_request('POST', '/api/v1/statuses', params) 346 return self.__api_request('POST', '/api/v1/statuses', params)
347 347
348 def toot(self, status): 348 def toot(self, status, sensitive=False, visibility="public"):
349 """ 349 """
350 Synonym for status_post that only takes the status text as input. 350 Synonym for status_post that only takes the status text as input.
351 351
352 Returns a toot dict with the new status. 352 Returns a toot dict with the new status.
353 """ 353 """
354 return self.status_post(status) 354 return self.status_post(status, sensitive=sensitive, visibility=visibility)
355 355
356 def status_delete(self, id): 356 def status_delete(self, id):
357 """ 357 """
Powered by cgit v1.2.3 (git 2.41.0)