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

docs/api.rst
tweepy/api.py

index 7cade1f1a1b69c0d434ff4c12722cea3442fcf28..440648ee566745e45da6f62328255781789c96b5 100644 (file)
@@ -19,21 +19,7 @@ This page contains some basic documentation for the Tweepy module.
 Timeline methods
 ----------------
 
-.. method:: API.home_timeline([count], [since_id], [max_id], [trim_user], \
-                              [exclude_replies], [include_entities])
-
-   Returns the 20 most recent statuses, including retweets, posted by the
-   authenticating user and that user's friends. This is the equivalent of
-   /timeline/home on the Web.
-
-   :param count: |count|
-   :param since_id: |since_id|
-   :param max_id: |max_id|
-   :param trim_user: |trim_user|
-   :param exclude_replies: |exclude_replies|
-   :param include_entities: |include_entities|
-   :rtype: list of :class:`Status` objects
-
+.. automethod:: API.home_timeline
 
 .. method:: API.statuses_lookup(id_, [include_entities], [trim_user], [map_], \
                                 [include_ext_alt_text], [include_card_uri])
index 1dbe116218259adc4afe2d9ab9a6171b310695b2..f0652765054228dd5c11074c2a3aad1dc8bb958c 100644 (file)
@@ -254,7 +254,23 @@ class API:
     @pagination(mode='id')
     @payload('status', list=True)
     def home_timeline(self, **kwargs):
-        """ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/tweets/timelines/api-reference/get-statuses-home_timeline
+        """home_timeline(*, count, since_id, max_id, trim_user, \
+                         exclude_replies, include_entities)
+
+        Returns the 20 most recent statuses, including retweets, posted by
+        the authenticating user and that user's friends. This is the equivalent
+        of /timeline/home on the Web.
+
+        :param count: |count|
+        :param since_id: |since_id|
+        :param max_id: |max_id|
+        :param trim_user: |trim_user|
+        :param exclude_replies: |exclude_replies|
+        :param include_entities: |include_entities|
+
+        :rtype: list of :class:`Status` objects
+
+        :reference: https://developer.twitter.com/en/docs/twitter-api/v1/tweets/timelines/api-reference/get-statuses-home_timeline
         """
         return self.request(
             'GET', 'statuses/home_timeline', endpoint_parameters=(