.. automethod:: API.get_list
+.. automethod:: API.list_timeline
+
User methods
------------
:rtype: list of :class:`List` objects
-.. method:: API.list_timeline(list_id/slug, [owner_id/owner_screen_name], \
- [since_id], [max_id], [count], \
- [include_entities], [include_rts])
-
- Returns a timeline of tweets authored by members of the specified list.
- Retweets are included by default. Use the ``include_rts=false`` parameter to
- omit retweets.
-
- :param list_id: |list_id|
- :param slug: |slug|
- :param owner_id: |owner_id|
- :param owner_screen_name: |owner_screen_name|
- :param since_id: |since_id|
- :param max_id: |max_id|
- :param count: |count|
- :param include_entities: |include_entities|
- :param include_rts: A boolean indicating whether the list timeline will
- contain native retweets (if they exist) in addition to the standard
- stream of tweets. The output format of retweeted tweets is identical to
- the representation you see in home_timeline.
- :rtype: list of :class:`Status` objects
-
-
.. method:: API.add_list_member(list_id/slug, screen_name/user_id, \
[owner_id/owner_screen_name])
), **kwargs
)
+ @pagination(mode='id')
+ @payload('status', list=True)
+ def list_timeline(self, **kwargs):
+ """list_timeline(*, list_id, slug, owner_screen_name, owner_id, \
+ since_id, max_id, count, include_entities, \
+ include_rts)
+
+ Returns a timeline of Tweets authored by members of the specified list.
+ Retweets are included by default. Use the ``include_rts=false``
+ parameter to omit retweets.
+
+ :param list_id: |list_id|
+ :param slug: |slug|
+ :param owner_screen_name: |owner_screen_name|
+ :param owner_id: |owner_id|
+ :param since_id: |since_id|
+ :param max_id: |max_id|
+ :param count: |count|
+ :param include_entities: |include_entities|
+ :param include_rts: A boolean indicating whether the list timeline will
+ contain native retweets (if they exist) in addition to the standard
+ stream of Tweets. The output format of retweeted Tweets is
+ identical to the representation you see in home_timeline.
+
+ :rtype: list of :class:`Status` objects
+
+ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/create-manage-lists/api-reference/get-lists-statuses
+ """
+ return self.request(
+ 'GET', 'lists/statuses', endpoint_parameters=(
+ 'list_id', 'slug', 'owner_screen_name', 'owner_id', 'since_id',
+ 'max_id', 'count', 'include_entities', 'include_rts'
+ ), **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
)
- @pagination(mode='id')
- @payload('status', list=True)
- def list_timeline(self, **kwargs):
- """ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/create-manage-lists/api-reference/get-lists-statuses
- """
- return self.request(
- 'GET', 'lists/statuses', endpoint_parameters=(
- 'list_id', 'slug', 'owner_screen_name', 'owner_id', 'since_id',
- 'max_id', 'count', 'include_entities', 'include_rts'
- ), **kwargs
- )
-
@payload('list')
def add_list_member(self, **kwargs):
""" :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/create-manage-lists/api-reference/post-lists-members-create