Fixes #244
This commit is contained in:
parent
dd3727c6f5
commit
06f5425724
3 changed files with 50 additions and 1 deletions
|
|
@ -12,7 +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.
|
||||
- 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.
|
||||
- Added method ``get_list_memberships``
|
||||
- Added methods ``get_list_memberships``, ``get_twitter_configuration``, ``get_supported_languages``, ``get_privacy_policy``, ``get_tos``
|
||||
|
||||
3.0.0 (2013-06-18)
|
||||
++++++++++++++++++
|
||||
|
|
|
|||
|
|
@ -482,6 +482,22 @@ class TwythonAPITestCase(unittest.TestCase):
|
|||
self.api.get_closest_trends(lat='37', long='-122')
|
||||
|
||||
# Help
|
||||
def test_get_twitter_configuration(self):
|
||||
"""Test getting Twitter's configuration succeeds"""
|
||||
self.api.get_twitter_configuration()
|
||||
|
||||
def test_get_supported_languages(self):
|
||||
"""Test getting languages supported by Twitter succeeds"""
|
||||
self.api.get_supported_languages()
|
||||
|
||||
def test_privacy_policy(self):
|
||||
"""Test getting Twitter's Privacy Policy succeeds"""
|
||||
self.api.get_privacy_policy()
|
||||
|
||||
def test_get_tos(self):
|
||||
"""Test getting the Twitter Terms of Service succeeds"""
|
||||
self.api.get_tos()
|
||||
|
||||
def test_get_application_rate_limit_status(self):
|
||||
"""Test getting application rate limit status succeeds"""
|
||||
self.oauth2_api.get_application_rate_limit_status()
|
||||
|
|
|
|||
|
|
@ -814,6 +814,39 @@ class EndpointsMixin(object):
|
|||
return self.post('oauth2/invalidate_token', params=params)
|
||||
|
||||
# Help
|
||||
def get_twitter_configuration(self, **params):
|
||||
"""Returns the current configuration used by Twitter
|
||||
|
||||
Docs: https://dev.twitter.com/docs/api/1.1/get/help/configuration
|
||||
|
||||
"""
|
||||
return self.get('help/configuration', params=params)
|
||||
|
||||
def get_supported_languages(self, **params):
|
||||
"""Returns the list of languages supported by Twitter along with
|
||||
their ISO 639-1 code.
|
||||
|
||||
Docs: https://dev.twitter.com/docs/api/1.1/get/help/languages
|
||||
|
||||
"""
|
||||
return self.get('help/languages', params=params)
|
||||
|
||||
def get_privacy_policy(self, **params):
|
||||
"""Returns Twitter's Privacy Policy
|
||||
|
||||
Docs: https://dev.twitter.com/docs/api/1.1/get/help/privacy
|
||||
|
||||
"""
|
||||
return self.get('help/privacy', params=params)
|
||||
|
||||
def get_tos(self, **params):
|
||||
"""Return the Twitter Terms of Service
|
||||
|
||||
Docs: https://dev.twitter.com/docs/api/1.1/get/help/tos
|
||||
|
||||
"""
|
||||
return self.get('help/tos', params=params)
|
||||
|
||||
def get_application_rate_limit_status(self, **params):
|
||||
"""Returns the current rate limits for methods belonging to the
|
||||
specified resource families.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue