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

docs/api.rst
tweepy/api.py

index 2423e170be49e7630b6e69306d9a8e348d28c22e..1b6c09093f0d6dbc2061e81eaf6b89be4ecbe821 100644 (file)
@@ -215,6 +215,8 @@ Upload media
 
 .. automethod:: API.media_upload
 
+.. automethod:: API.simple_upload
+
 
 Account Methods
 ---------------
@@ -432,20 +434,6 @@ Utility methods
 Media methods
 -------------
 
-.. method:: API.simple_upload(filename, [file], [media_category], \
-                              [additional_owners])
-
-   Use this endpoint to upload media to Twitter.
-   This does not use the chunked upload endpoints.
-
-   :param filename: |filename|
-   :param file: |file|
-   :param media_category: |media_category|
-   :param additional_owners: |additional_owners|
-
-   :rtype: :class:`Media` object
-
-
 .. method:: API.chunked_upload(filename, [file], [file_type], \
                                [wait_for_async_finalize], [media_category], \
                                [additional_owners])
index 252e1fb2a24b494387ef25236cc755d6c739915f..3289827331ba0da37e82391c8c85e6f717b2d4f4 100644 (file)
@@ -2393,7 +2393,19 @@ class API:
     @payload('media')
     def simple_upload(self, filename, *, file=None, 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
+        """simple_upload(filename, *, file, media_category, additional_owners)
+
+        Use this endpoint to upload media to Twitter. This does not use the
+        chunked upload endpoints.
+
+        :param filename: |filename|
+        :param file: |file|
+        :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
         """
         if file is not None:
             files = {'media': (filename, file)}