Update and improve documentation for API.lists_memberships
authorHarmon <Harmon758@gmail.com>
Mon, 24 May 2021 11:36:57 +0000 (06:36 -0500)
committerHarmon <Harmon758@gmail.com>
Mon, 24 May 2021 11:36:57 +0000 (06:36 -0500)
tweepy/api.py

index adfbc9391927fc2e349670287330a65f726e639e..30ba1fef022a49968f9564a6f824caa644dabbc0 100644 (file)
@@ -1412,17 +1412,28 @@ class API:
         or ``screen_name`` are not provided, the memberships for the
         authenticating user are returned.
 
-        :param user_id: |user_id|
-        :param screen_name: |screen_name|
-        :param count: |count|
-        :param cursor: |cursor|
-        :param filter_to_owned_lists: A boolean indicating whether to return
-            just lists the authenticating user owns, and the user represented
-            by ``user_id`` or ``screen_name`` is a member of.
+        Parameters
+        ----------
+        user_id
+            |user_id|
+        screen_name
+            |screen_name|
+        count
+            |count|
+        cursor
+            |cursor|
+        filter_to_owned_lists
+            A boolean indicating whether to return just lists the
+            authenticating user owns, and the user represented by ``user_id``
+            or ``screen_name`` is a member of.
 
-        :rtype: list of :class:`List` objects
+        Returns
+        -------
+        :py:class:`List`\ [:class:`~tweepy.models.List`]
 
-        :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/create-manage-lists/api-reference/get-lists-memberships
+        References
+        ----------
+        https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/create-manage-lists/api-reference/get-lists-memberships
         """
         return self.request(
             'GET', 'lists/memberships', endpoint_parameters=(