From: Harmon Date: Sun, 1 Sep 2019 20:02:10 +0000 (-0500) Subject: Fix documentation for API.media_upload X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=3e620e58a3435140d9b3ce854026e63594a62e4d;p=tweepy.git Fix documentation for API.media_upload --- diff --git a/docs/api.rst b/docs/api.rst index 4fc476d..ad8ff5e 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -1071,18 +1071,16 @@ Utility methods Media methods ------------- -.. method:: API.media_upload() - - Uploads images to twitter and returns a `media_id`. - - :param media: The raw binary file content being uploaded. - Cannot be used with `media_data`. - :param media_data: The base64-encoded file content being uploaded. - Cannot be used with `media`. - :param additional_owners: A comma-separated list of user IDs to set as - additional owners allowed to use the returned - `media_id` in Tweets or Cards. - Up to 100 additional owners may be specified. +.. method:: API.media_upload(filename, [file]) + + Use this endpoint to upload images to Twitter. + + :param filename: The filename of the image to upload. This will + automatically be opened unless `file` is specified. + :param file: A file object, which will be used instead of opening + ``filename``. ``filename`` is still required, for MIME type + detection and to use as a form field in the POST data. + :rtype: :class:`Media` object .. method:: API.create_media_metadata(media_id, alt_text)