Update and improve documentation for API.show_list_subscriber
authorHarmon <Harmon758@gmail.com>
Mon, 24 May 2021 12:56:24 +0000 (07:56 -0500)
committerHarmon <Harmon758@gmail.com>
Mon, 24 May 2021 12:56:24 +0000 (07:56 -0500)
tweepy/api.py

index 9b4e367396f7b0d97e2073fd97e3fc0b01d388d0..7bbe851e3f3d11c374dc39e4180635e000ba9353 100644 (file)
@@ -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=(