.. automethod:: API.followers_ids
+.. automethod:: API.followers
+
User methods
------------
:rtype: list of :class:`User` objects
-.. method:: API.followers([id/screen_name/user_id], [cursor])
-
- Returns a user's followers ordered in which they were added. If no user is
- specified by id/screen name, it defaults to the authenticated user.
-
- :param id: |uid|
- :param user_id: |user_id|
- :param screen_name: |screen_name|
- :param cursor: |cursor|
- :param count: |count|
- :param skip_status: |skip_status|
- :param include_user_entities: |include_user_entities|
- :rtype: list of :class:`User` objects
-
-
.. method:: API.lookup_users([user_ids], [screen_names], [include_entities], \
[tweet_mode])
), **kwargs
)
+ @pagination(mode='cursor')
+ @payload('user', list=True)
+ def followers(self, **kwargs):
+ """followers(*, user_id, screen_name, cursor, count, skip_status, \
+ include_user_entities)
+
+ Returns a user's followers ordered in which they were added. If no user
+ is specified by id/screen name, it defaults to the authenticated user.
+
+ :param user_id: |user_id|
+ :param screen_name: |screen_name|
+ :param cursor: |cursor|
+ :param count: |count|
+ :param skip_status: |skip_status|
+ :param include_user_entities: |include_user_entities|
+
+ :rtype: list of :class:`User` objects
+
+ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/get-followers-list
+ """
+ return self.request(
+ 'GET', 'followers/list', endpoint_parameters=(
+ 'user_id', 'screen_name', 'cursor', 'count', 'skip_status',
+ 'include_user_entities'
+ ), **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='cursor')
- @payload('user', list=True)
- def followers(self, **kwargs):
- """ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/get-followers-list
- """
- return self.request(
- 'GET', 'followers/list', endpoint_parameters=(
- 'user_id', 'screen_name', 'cursor', 'count', 'skip_status',
- 'include_user_entities'
- ), **kwargs
- )
-
@payload('json')
def get_settings(self, **kwargs):
""" :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/manage-account-settings/api-reference/get-account-settings