From 3e620e58a3435140d9b3ce854026e63594a62e4d Mon Sep 17 00:00:00 2001 From: Harmon Date: Sun, 1 Sep 2019 15:02:10 -0500 Subject: [PATCH] Fix documentation for API.media_upload --- docs/api.rst | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) 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) -- 2.25.1