Update Mastodon.py documentation for status_post()

Updated the docstring for the status_post method to more clearly indicate that the *media_id* argument must be a list even when passing in media dicts returned by *media_post*. (This inclarity cost me quite a bit of debugging this evening.)
This commit is contained in:
Noëlle Anthony 2018-02-01 18:57:59 -05:00 committed by GitHub
parent 0cd284bc2f
commit 83daab6e31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -893,9 +893,12 @@ class Mastodon:
sensitive=False, visibility='', spoiler_text=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 media.
also be the `media dicts`_ returned by `media_post()`_ - they are unpacked
automatically. `media_ids` must be a list (even if you're only attaching one item). It
can contain up to four pieces of media (uploaded via `media_post()`_).
`media_ids` can also be the `media dicts`_ returned by `media_post()`_ -
they are unpacked automatically.
The `sensitive` boolean decides whether or not media attached to the post The `sensitive` boolean decides whether or not media attached to the post
should be marked as sensitive, which hides it by default on the Mastodon should be marked as sensitive, which hides it by default on the Mastodon