From b4fab75f5fe68f42c1ccd6f4f601c3eec340c155 Mon Sep 17 00:00:00 2001 From: Harmon Date: Mon, 24 May 2021 07:56:24 -0500 Subject: [PATCH] Update and improve documentation for API.show_list_subscriber --- tweepy/api.py | 46 +++++++++++++++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 13 deletions(-) diff --git a/tweepy/api.py b/tweepy/api.py index 9b4e367..7bbe851 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -1605,24 +1605,44 @@ class API: @payload('user') def show_list_subscriber(self, **kwargs): - """show_list_subscriber(*, owner_screen_name, owner_id, list_id, \ - slug, user_id, screen_name, include_entities \ - skip_status) + """show_list_subscriber( \ + *, owner_screen_name, owner_id, list_id, slug, user_id, \ + screen_name, include_entities skip_status \ + ) Check if the specified user is a subscriber of the specified list. - :param owner_screen_name: |owner_screen_name| - :param owner_id: |owner_id| - :param list_id: |list_id| - :param slug: |slug| - :param user_id: |user_id| - :param screen_name: |screen_name| - :param include_entities: |include_entities| - :param skip_status: |skip_status| + Parameters + ---------- + owner_screen_name + |owner_screen_name| + owner_id + |owner_id| + list_id + |list_id| + slug + |slug| + user_id + |user_id| + screen_name + |screen_name| + include_entities + |include_entities| + skip_status + |skip_status| - :rtype: :class:`User` object if user is subscribed to list + Raises + ------ + :class:`~tweepy.errors.NotFound` + The user is not a subscriber of the list. - :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/create-manage-lists/api-reference/get-lists-subscribers-show + Returns + ------- + :class:`~tweepy.models.User` + + References + ---------- + https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/create-manage-lists/api-reference/get-lists-subscribers-show """ return self.request( 'GET', 'lists/subscribers/show', endpoint_parameters=( -- 2.25.1