Fixes #243
This commit is contained in:
parent
52e025a6a2
commit
dd3727c6f5
3 changed files with 15 additions and 0 deletions
|
|
@ -12,6 +12,7 @@ History
|
||||||
- When an actual request error happens and a ``RequestException`` is raised, it is caught and a ``TwythonError`` is raised instead for convenience.
|
- When an actual request error happens and a ``RequestException`` is raised, it is caught and a ``TwythonError`` is raised instead for convenience.
|
||||||
- Added "cursor"-like functionality. Endpoints with the attribute ``iter_mode`` will be able to be passed to ``Twython.cursor`` and returned as a generator.
|
- Added "cursor"-like functionality. Endpoints with the attribute ``iter_mode`` will be able to be passed to ``Twython.cursor`` and returned as a generator.
|
||||||
- ``Twython.search_gen`` has been deprecated. Please use ``twitter.cursor(twitter.search, q='your_query')`` instead, where ``twitter`` is your ``Twython`` instance.
|
- ``Twython.search_gen`` has been deprecated. Please use ``twitter.cursor(twitter.search, q='your_query')`` instead, where ``twitter`` is your ``Twython`` instance.
|
||||||
|
- Added method ``get_list_memberships``
|
||||||
|
|
||||||
3.0.0 (2013-06-18)
|
3.0.0 (2013-06-18)
|
||||||
++++++++++++++++++
|
++++++++++++++++++
|
||||||
|
|
|
||||||
|
|
@ -385,6 +385,10 @@ class TwythonAPITestCase(unittest.TestCase):
|
||||||
|
|
||||||
self.api.delete_list(list_id=list_id)
|
self.api.delete_list(list_id=list_id)
|
||||||
|
|
||||||
|
def test_get_list_memberships(self):
|
||||||
|
"""Test list of memberhips the authenticated user succeeds"""
|
||||||
|
self.api.get_list_memberships()
|
||||||
|
|
||||||
def test_get_list_subscribers(self):
|
def test_get_list_subscribers(self):
|
||||||
"""Test list of subscribers of a specific list succeeds"""
|
"""Test list of subscribers of a specific list succeeds"""
|
||||||
self.api.get_list_subscribers(slug=test_list_slug,
|
self.api.get_list_subscribers(slug=test_list_slug,
|
||||||
|
|
|
||||||
|
|
@ -552,6 +552,16 @@ class EndpointsMixin(object):
|
||||||
"""
|
"""
|
||||||
return self.post('lists/members/destroy', params=params)
|
return self.post('lists/members/destroy', params=params)
|
||||||
|
|
||||||
|
def get_list_memberships(self, **params):
|
||||||
|
"""Returns the lists the specified user has been added to.
|
||||||
|
|
||||||
|
Docs: https://dev.twitter.com/docs/api/1.1/get/lists/memberships
|
||||||
|
|
||||||
|
"""
|
||||||
|
return self.get('lists/memberships', params=params)
|
||||||
|
get_list_memberships.iter_mode = 'cursor'
|
||||||
|
get_list_memberships.iter_key = 'lists'
|
||||||
|
|
||||||
def get_list_subscribers(self, **params):
|
def get_list_subscribers(self, **params):
|
||||||
"""Returns the subscribers of the specified list.
|
"""Returns the subscribers of the specified list.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue