Update and improve documentation for API.statuses_lookup
authorHarmon <Harmon758@gmail.com>
Tue, 6 Apr 2021 22:14:29 +0000 (17:14 -0500)
committerHarmon <Harmon758@gmail.com>
Tue, 6 Apr 2021 22:14:29 +0000 (17:14 -0500)
Automatically use docstring for documentation
Update id and map parameter names in documentation
Improve capitalization

docs/api.rst
tweepy/api.py

index 7f71f9ea4b25e0d050cb9c50d21e8a7a8c321b2c..9fc6233050df024ab04c06a867b63492e6a43a05 100644 (file)
@@ -30,20 +30,7 @@ Post, retrieve, and engage with Tweets
 
 .. automethod:: API.favorites
 
-.. method:: API.statuses_lookup(id_, [include_entities], [trim_user], [map_], \
-                                [include_ext_alt_text], [include_card_uri])
-
-   Returns full Tweet objects for up to 100 tweets per request, specified by
-   the ``id_`` parameter.
-
-   :param id\_: A list of Tweet IDs to lookup, up to 100
-   :param include_entities: |include_entities|
-   :param trim_user: |trim_user|
-   :param map\_: A boolean indicating whether or not to include tweets that
-                 cannot be shown. Defaults to False.
-   :param include_ext_alt_text: |include_ext_alt_text|
-   :param include_card_uri: |include_card_uri|
-   :rtype: list of :class:`Status` objects
+.. automethod:: API.statuses_lookup
 
 .. method:: API.retweets_of_me([since_id], [max_id], [count], [page])
 
index 8b6d00ad595770d026b72d705a3b1e9b4d508031..032c3287597c45f731a9a0f7f4331eb95c2a8850 100644 (file)
@@ -371,7 +371,23 @@ class API:
 
     @payload('status', list=True)
     def statuses_lookup(self, id, **kwargs):
-        """ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/tweets/post-and-engage/api-reference/get-statuses-lookup
+        """statuses_lookup(id, *, include_entities, trim_user, map, \
+                           include_ext_alt_text, include_card_uri)
+
+        Returns full Tweet objects for up to 100 Tweets per request, specified
+        by the ``id`` parameter.
+
+        :param id: A list of Tweet IDs to lookup, up to 100
+        :param include_entities: |include_entities|
+        :param trim_user: |trim_user|
+        :param map: A boolean indicating whether or not to include Tweets
+                    that cannot be shown. Defaults to False.
+        :param include_ext_alt_text: |include_ext_alt_text|
+        :param include_card_uri: |include_card_uri|
+
+        :rtype: list of :class:`Status` objects
+
+        :reference: https://developer.twitter.com/en/docs/twitter-api/v1/tweets/post-and-engage/api-reference/get-statuses-lookup
         """
         return self.request(
             'GET', 'statuses/lookup', endpoint_parameters=(