From f60ff60e137ffb9a8e17cbda075453136d965b8c Mon Sep 17 00:00:00 2001 From: Florian Piesche Date: Mon, 23 Jan 2017 09:57:13 +0000 Subject: Add support for sensitive toots and visibility settings. --- mastodon/Mastodon.py | 10 +++++----- 1 file 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: ### # Writing data: Statuses ### - def status_post(self, status, in_reply_to_id = None, media_ids = None): + def status_post(self, status, in_reply_to_id = None, media_ids = None, sensitive = False, visibility = "public"): """ 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 @@ -341,17 +341,17 @@ class Mastodon: raise MastodonIllegalArgumentError("Invalid media dict.") params_initial["media_ids"] = media_ids_proper - - params = self.__generate_params(params_initial) + + params = self.__generate_params(params_initial) return self.__api_request('POST', '/api/v1/statuses', params) - def toot(self, status): + def toot(self, status, sensitive=False, visibility="public"): """ Synonym for status_post that only takes the status text as input. Returns a toot dict with the new status. """ - return self.status_post(status) + return self.status_post(status, sensitive=sensitive, visibility=visibility) def status_delete(self, id): """ -- cgit v1.2.3