From: Harmon Date: Tue, 6 Apr 2021 18:43:38 +0000 (-0500) Subject: Update and improve documentation for API.home_timeline X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=fe28e69003a6302aaa24ac2811011d4c4e76d195;p=tweepy.git Update and improve documentation for API.home_timeline Automatically use docstring for documentation --- diff --git a/docs/api.rst b/docs/api.rst index 7cade1f..440648e 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -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]) diff --git a/tweepy/api.py b/tweepy/api.py index 1dbe116..f065276 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -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=(