Commit 3ade9e68 authored by Mark Nunnikhoven's avatar Mark Nunnikhoven
Browse files

Added additional params to .friends(). Now you can request the latest status...

Added additional params to .friends(). Now you can request the latest status (skip_status) and that the user entity be returned with the request (include_user_entities)
parent ae1465d3
...@@ -174,7 +174,7 @@ User methods ...@@ -174,7 +174,7 @@ User methods
:rtype: :class:`User` object :rtype: :class:`User` object
.. method::API.friends([id/user_id/screen_name], [cursor]) .. method::API.friends([id/user_id/screen_name], [cursor], [skip_status], [include_user_entities])
Returns an user's friends ordered in which they were added 100 at a time. If no user is specified it defaults to the authenticated user. Returns an user's friends ordered in which they were added 100 at a time. If no user is specified it defaults to the authenticated user.
...@@ -182,6 +182,8 @@ User methods ...@@ -182,6 +182,8 @@ User methods
:param user_id: |user_id| :param user_id: |user_id|
:param screen_name: |screen_name| :param screen_name: |screen_name|
:param cursor: |cursor| :param cursor: |cursor|
:param skip_status: |skip_status|
:param include_user_entities: |include_user_entities|
:rtype: list of :class:`User` objects :rtype: list of :class:`User` objects
......
...@@ -528,13 +528,13 @@ class API(object): ...@@ -528,13 +528,13 @@ class API(object):
@property @property
def friends(self): def friends(self):
""" :reference: https://dev.twitter.com/rest/reference/get/friends/list """ :reference: https://dev.twitter.com/rest/reference/get/friends/list
:allowed_param:'id', 'user_id', 'screen_name', 'cursor' :allowed_param:'id', 'user_id', 'screen_name', 'cursor', 'skip_status', 'include_user_entities'
""" """
return bind_api( return bind_api(
api=self, api=self,
path='/friends/list.json', path='/friends/list.json',
payload_type='user', payload_list=True, payload_type='user', payload_list=True,
allowed_param=['id', 'user_id', 'screen_name', 'cursor'] allowed_param=['id', 'user_id', 'screen_name', 'cursor', 'skip_status', 'include_user_entities']
) )
@property @property
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment