Update and improve documentation for API.chunked_upload_init
authorHarmon <Harmon758@gmail.com>
Sun, 11 Apr 2021 18:47:17 +0000 (13:47 -0500)
committerHarmon <Harmon758@gmail.com>
Sun, 11 Apr 2021 18:47:17 +0000 (13:47 -0500)
Automatically use docstring for documentation
Improve documentation order

docs/api.rst
tweepy/api.py

index f1d79e26e17bb44a896cf2dc6ce19a182769386f..d09622290f859778300df14ec8f240782201aea7 100644 (file)
@@ -223,6 +223,8 @@ Upload media
 
 .. automethod:: API.chunked_upload_finalize
 
+.. automethod:: API.chunked_upload_init
+
 
 Account Methods
 ---------------
@@ -437,22 +439,6 @@ Utility methods
    when they are loaded, but no more than once a day.
 
 
-Media methods
--------------
-
-.. method:: API.chunked_upload_init(total_bytes, media_type, \
-                                    [media_category], [additional_owners])
-
-   Use this endpoint to initiate a chunked file upload session.
-
-   :param total_bytes: The size of the media being uploaded in bytes.
-   :param media_type: The MIME type of the media being uploaded.
-   :param media_category: |media_category|
-   :param additional_owners: |additional_owners|
-
-   :rtype: :class:`Media` object
-
-
 :mod:`tweepy.error` --- Exceptions
 ==================================
 
index 44b7f157c038ce9d6ec9d5d9fe75824db83e3634..c3348744eb725bbb8620ede7a50d61e97304c784 100644 (file)
@@ -2543,7 +2543,19 @@ class API:
     def chunked_upload_init(self, total_bytes, media_type, *,
                             media_category=None, additional_owners=None,
                             **kwargs):
-        """ :reference https://developer.twitter.com/en/docs/twitter-api/v1/media/upload-media/api-reference/post-media-upload-init
+        """chunked_upload_init(total_bytes, media_type, *, media_category, \
+                               additional_owners)
+
+        Use this endpoint to initiate a chunked file upload session.
+
+        :param total_bytes: The size of the media being uploaded in bytes.
+        :param media_type: The MIME type of the media being uploaded.
+        :param media_category: |media_category|
+        :param additional_owners: |additional_owners|
+
+        :rtype: :class:`Media` object
+
+        :reference https://developer.twitter.com/en/docs/twitter-api/v1/media/upload-media/api-reference/post-media-upload-init
         """
         headers = {'Content-Type': 'application/x-www-form-urlencoded'}