Optional parameter
This commit is contained in:
parent
920f433f8a
commit
1fa262628f
1 changed files with 4 additions and 2 deletions
|
|
@ -385,7 +385,7 @@ class Twython(EndpointsMixin, object):
|
|||
|
||||
return authorized_tokens # pragma: no cover
|
||||
|
||||
def obtain_request_tokens(self, oauth_callback, x_auth_access_type='read'):
|
||||
def obtain_request_tokens(self, oauth_callback, x_auth_access_type=''):
|
||||
"""Allows a Consumer application to obtain an OAuth Request Token to
|
||||
request user authorization.
|
||||
|
||||
|
|
@ -404,9 +404,11 @@ class Twython(EndpointsMixin, object):
|
|||
"""
|
||||
data = {
|
||||
'oauth_callback': oauth_callback,
|
||||
'x_auth_access_type': x_auth_access_type,
|
||||
}
|
||||
|
||||
if x_auth_access_type:
|
||||
data['x_auth_access_type'] = x_auth_access_type
|
||||
|
||||
response = self.client.post(self.request_token_url, data=data)
|
||||
request_tokens = dict(parse_qsl(response.content.decode('utf-8')))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue