Update and improve documentation for API.media_upload
authorHarmon <Harmon758@gmail.com>
Thu, 27 May 2021 15:42:27 +0000 (10:42 -0500)
committerHarmon <Harmon758@gmail.com>
Thu, 27 May 2021 15:42:27 +0000 (10:42 -0500)
tweepy/api.py

index bac2fd0ad2503733b41ca5d3aa7b42178b528138..cd59e3bb8a135ac7633799ce8a0a1fe5b9180f73 100644 (file)
@@ -3358,17 +3358,27 @@ class API:
         media is a video, ``wait_for_async_finalize`` can be specified as a
         keyword argument to be passed to :func:`API.chunked_upload`.
 
-        :param filename: |filename|
-        :param file: |file|
-        :param chunked: Whether or not to use chunked media upload. Videos use
-                        chunked upload regardless of this parameter. Defaults
-                        to ``False``.
-        :param media_category: |media_category|
-        :param additional_owners: |additional_owners|
+        Parameters
+        ----------
+        filename
+            |filename|
+        file
+            |file|
+        chunked
+            Whether or not to use chunked media upload. Videos use chunked
+            upload regardless of this parameter. Defaults to ``False``.
+        media_category
+            |media_category|
+        additional_owners
+            |additional_owners|
 
-        :rtype: :class:`Media` object
+        Returns
+        -------
+        :class:`~tweepy.models.Media`
 
-        :reference: https://developer.twitter.com/en/docs/twitter-api/v1/media/upload-media/overview
+        References
+        ----------
+        https://developer.twitter.com/en/docs/twitter-api/v1/media/upload-media/overview
         """
         h = None
         if file is not None: