Fix documentation for API.media_upload
authorHarmon <Harmon758@gmail.com>
Sun, 1 Sep 2019 20:02:10 +0000 (15:02 -0500)
committerHarmon <Harmon758@gmail.com>
Sun, 1 Sep 2019 20:02:10 +0000 (15:02 -0500)
docs/api.rst

index 4fc476d26478f3b56ffdbea1f3c4ec37a8185536..ad8ff5eb2946a573c35121fbf56f71e4b219efcb 100644 (file)
@@ -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)