aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz Diener <[email protected]>2018-02-02 23:31:44 +0100
committerGitHub <[email protected]>2018-02-02 23:31:44 +0100
commitac0edd022fef41c2dcb8a8b8186cda13745dcd79 (patch)
tree82974fac6e8f933097d3aea86562676099e32a6a /mastodon
parent0cd284bc2fbf3679168853275e2baa05e9fa2b97 (diff)
parentdd587bb40300d247e9609f043339c51371463ade (diff)
downloadmastodon.py-ac0edd022fef41c2dcb8a8b8186cda13745dcd79.tar.gz
Merge pull request #121 from joyeusenoelle/patch-1
Update Mastodon.py documentation for status_post()
Diffstat (limited to 'mastodon')
-rw-r--r--mastodon/Mastodon.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index eeb0b48..874d925 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -893,9 +893,12 @@ class Mastodon:
893 sensitive=False, visibility='', spoiler_text=None): 893 sensitive=False, visibility='', spoiler_text=None):
894 """ 894 """
895 Post a status. Can optionally be in reply to another status and contain 895 Post a status. Can optionally be in reply to another status and contain
896 up to four pieces of media (Uploaded via `media_post()`_). media_ids can 896 media.
897 also be the `media dicts`_ returned by `media_post()`_ - they are unpacked 897
898 automatically. 898 `media_ids` should be a list. (If it's not, the function will turn it
899 into one.) It can contain up to four pieces of media (uploaded via
900 `media_post()`_). `media_ids` can also be the `media dicts`_ returned
901 by `media_post()`_ - they are unpacked automatically.
899 902
900 The `sensitive` boolean decides whether or not media attached to the post 903 The `sensitive` boolean decides whether or not media attached to the post
901 should be marked as sensitive, which hides it by default on the Mastodon 904 should be marked as sensitive, which hides it by default on the Mastodon
@@ -936,6 +939,8 @@ class Mastodon:
936 if media_ids is not None: 939 if media_ids is not None:
937 try: 940 try:
938 media_ids_proper = [] 941 media_ids_proper = []
942 if not isinstance(media_ids, (list, tuple)):
943 media_ids = [media_ids]
939 for media_id in media_ids: 944 for media_id in media_ids:
940 if isinstance(media_id, dict): 945 if isinstance(media_id, dict):
941 media_ids_proper.append(media_id["id"]) 946 media_ids_proper.append(media_id["id"])
Powered by cgit v1.2.3 (git 2.41.0)