Fixes #192, update HISTORY
This commit is contained in:
parent
6238912b96
commit
27c51b8ba6
2 changed files with 8 additions and 3 deletions
|
|
@ -6,6 +6,9 @@ History
|
||||||
- Added ``get_retweeters_ids`` method
|
- Added ``get_retweeters_ids`` method
|
||||||
- Fixed ``TwythonDeprecationWarning`` on camelCase functions if the camelCase was the same as the PEP8 function (i.e. ``Twython.retweet`` did not change)
|
- Fixed ``TwythonDeprecationWarning`` on camelCase functions if the camelCase was the same as the PEP8 function (i.e. ``Twython.retweet`` did not change)
|
||||||
- Fixed error message bubbling when error message returned from Twitter was not an array (i.e. if you try to retweet something twice, the error is not found at index 0)
|
- Fixed error message bubbling when error message returned from Twitter was not an array (i.e. if you try to retweet something twice, the error is not found at index 0)
|
||||||
|
- Added "transparent" parameters for making requests, meaning users can pass bool values (True, False) to Twython methods and we convert your params in the background to satisfy the Twitter API. Also, file objects can now be passed seamlessly (see examples in README and in /examples dir for details)
|
||||||
|
- Callback URL is optional in ``get_authentication_tokens`` to accomedate those using OOB authorization (non web clients)
|
||||||
|
- Not part of the python package, but tests are now available along with Travis CI hooks
|
||||||
|
|
||||||
2.9.1 (2013-05-04)
|
2.9.1 (2013-05-04)
|
||||||
++++++++++++++++++
|
++++++++++++++++++
|
||||||
|
|
|
||||||
|
|
@ -245,12 +245,14 @@ class Twython(object):
|
||||||
def get_authentication_tokens(self, callback_url=None, force_login=False, screen_name=''):
|
def get_authentication_tokens(self, callback_url=None, force_login=False, screen_name=''):
|
||||||
"""Returns a dict including an authorization URL (auth_url) to direct a user to
|
"""Returns a dict including an authorization URL (auth_url) to direct a user to
|
||||||
|
|
||||||
:param callback_url: (optional.. for now) Url the user is returned to after they authorize your app
|
:param callback_url: (optional) Url the user is returned to after they authorize your app (web clients only)
|
||||||
:param force_login: (optional) Forces the user to enter their credentials to ensure the correct users account is authorized.
|
:param force_login: (optional) Forces the user to enter their credentials to ensure the correct users account is authorized.
|
||||||
:param app_secret: (optional) If forced_login is set OR user is not currently logged in, Prefills the username input box of the OAuth login screen with the given value
|
:param app_secret: (optional) If forced_login is set OR user is not currently logged in, Prefills the username input box of the OAuth login screen with the given value
|
||||||
"""
|
"""
|
||||||
callback_url = callback_url or self.callback_url
|
callback_url = callback_url or self.callback_url
|
||||||
request_args = {'oauth_callback': callback_url}
|
request_args = {}
|
||||||
|
if callback_url:
|
||||||
|
request_args['oauth_callback'] = callback_url
|
||||||
response = self.client.get(self.request_token_url, params=request_args)
|
response = self.client.get(self.request_token_url, params=request_args)
|
||||||
|
|
||||||
if response.status_code == 401:
|
if response.status_code == 401:
|
||||||
|
|
@ -285,7 +287,7 @@ class Twython(object):
|
||||||
def get_authorized_tokens(self, oauth_verifier):
|
def get_authorized_tokens(self, oauth_verifier):
|
||||||
"""Returns authorized tokens after they go through the auth_url phase.
|
"""Returns authorized tokens after they go through the auth_url phase.
|
||||||
|
|
||||||
:param oauth_verifier: (required) The oauth_verifier retrieved from the callback url querystring
|
:param oauth_verifier: (required) The oauth_verifier (or a.k.a PIN for non web apps) retrieved from the callback url querystring
|
||||||
"""
|
"""
|
||||||
response = self.client.get(self.access_token_url, params={'oauth_verifier': oauth_verifier})
|
response = self.client.get(self.access_token_url, params={'oauth_verifier': oauth_verifier})
|
||||||
authorized_tokens = dict(parse_qsl(response.content.decode('utf-8')))
|
authorized_tokens = dict(parse_qsl(response.content.decode('utf-8')))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue