.. automethod:: API.list_members
+.. automethod:: API.show_list_member
+
User methods
------------
:rtype: :class:`List` object
-.. method:: API.show_list_member(list_id/slug, screen_name/user_id, \
- [owner_id/owner_screen_name])
-
- Check if the specified user is a member of the specified list.
-
- :param list_id: |list_id|
- :param slug: |slug|
- :param screen_name: |screen_name|
- :param user_id: |user_id|
- :param owner_id: |owner_id|
- :param owner_screen_name: |owner_screen_name|
- :rtype: :class:`User` object if user is a member of list
-
-
.. method:: API.subscribe_list(list_id/slug, [owner_id/owner_screen_name])
Subscribes the authenticated user to the specified list.
), **kwargs
)
+ @payload('user')
+ def show_list_member(self, **kwargs):
+ """show_list_member(*, list_id, slug, user_id, screen_name, \
+ owner_screen_name, owner_id, include_entities, \
+ skip_status)
+
+ Check if the specified user is a member of the specified list.
+
+ :param list_id: |list_id|
+ :param slug: |slug|
+ :param user_id: |user_id|
+ :param screen_name: |screen_name|
+ :param owner_screen_name: |owner_screen_name|
+ :param owner_id: |owner_id|
+ :param include_entities: |include_entities|
+ :param skip_status: |skip_status|
+
+ :rtype: :class:`User` object if user is a member of list
+
+ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/create-manage-lists/api-reference/get-lists-members-show
+ """
+ return self.request(
+ 'GET', 'lists/members/show', endpoint_parameters=(
+ 'list_id', 'slug', 'user_id', 'screen_name',
+ 'owner_screen_name', 'owner_id', 'include_entities',
+ 'skip_status'
+ ), **kwargs
+ )
+
def media_upload(self, filename, *, file=None, chunked=False,
media_category=None, additional_owners=None, **kwargs):
""" :reference: https://developer.twitter.com/en/docs/twitter-api/v1/media/upload-media/overview
), **kwargs
)
- @payload('user')
- def show_list_member(self, **kwargs):
- """ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/create-manage-lists/api-reference/get-lists-members-show
- """
- return self.request(
- 'GET', 'lists/members/show', endpoint_parameters=(
- 'list_id', 'slug', 'user_id', 'screen_name',
- 'owner_screen_name', 'owner_id', 'include_entities',
- 'skip_status'
- ), **kwargs
- )
-
@payload('list')
def subscribe_list(self, **kwargs):
""" :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/create-manage-lists/api-reference/post-lists-subscribers-create