Update and improve documentation for API.get_status
authorHarmon <Harmon758@gmail.com>
Tue, 6 Apr 2021 23:40:43 +0000 (18:40 -0500)
committerHarmon <Harmon758@gmail.com>
Tue, 6 Apr 2021 23:42:16 +0000 (18:42 -0500)
Automatically use docstring for documentation

docs/api.rst
tweepy/api.py

index 216d93bf65b02af5d52c85693374a86d80b37bc4..64d9da04ebf665137fddd96c3f4225f6f0ef182f 100644 (file)
@@ -43,28 +43,12 @@ Post, retrieve, and engage with Tweets
 
 .. automethod:: API.retweets_of_me
 
+.. automethod:: API.get_status
+
 
 Status methods
 --------------
 
-.. method:: API.get_status(id, [trim_user], [include_my_retweet], \
-                           [include_entities], [include_ext_alt_text], \
-                           [include_card_uri])
-
-   Returns a single status specified by the ID parameter.
-
-   :param id: |sid|
-   :param trim_user: |trim_user|
-   :param include_my_retweet: A boolean indicating if any Tweets returned that
-      have been retweeted by the authenticating user should include an
-      additional current_user_retweet node, containing the ID of the source
-      status for the retweet.
-   :param include_entities: |include_entities|
-   :param include_ext_alt_text: |include_ext_alt_text|
-   :param include_card_uri: |include_card_uri|
-   :rtype: :class:`Status` object
-
-
 .. method:: API.update_status(status, [in_reply_to_status_id], \
                               [auto_populate_reply_metadata], \
                               [exclude_reply_user_ids], [attachment_url], \
index 2a254753ef38481efecf2deb82d5dad04ec65da9..24e99786e836551a8e0c075a2b560dcf67953214 100644 (file)
@@ -540,7 +540,24 @@ class API:
 
     @payload('status')
     def get_status(self, id, **kwargs):
-        """ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/tweets/post-and-engage/api-reference/get-statuses-show-id
+        """get_status(id, *, trim_user, include_my_retweet, include_entities, \
+                      include_ext_alt_text, include_card_uri)
+
+        Returns a single status specified by the ID parameter.
+
+        :param id: |sid|
+        :param trim_user: |trim_user|
+        :param include_my_retweet: A boolean indicating if any Tweets returned
+            that have been retweeted by the authenticating user should include
+            an additional current_user_retweet node, containing the ID of the
+            source status for the retweet.
+        :param include_entities: |include_entities|
+        :param include_ext_alt_text: |include_ext_alt_text|
+        :param include_card_uri: |include_card_uri|
+
+        :rtype: :class:`Status` object
+
+        :reference: https://developer.twitter.com/en/docs/twitter-api/v1/tweets/post-and-engage/api-reference/get-statuses-show-id
         """
         return self.request(
             'GET', 'statuses/show', endpoint_parameters=(