Changeset eeef45bd880a…
Parent 449230ad6594…
by Ben McCormack <benm@fogcreek.com>
Changes to one file · Browse files at eeef45bd880a Showing diff from parent 449230ad6594 Diff from another changeset...
@@ -16,10 +16,16 @@ self._token = token
def set_proxy(self, proxies):
+ '''e.g. proxies={'https':'127.0.0.1:8888'}'''
self._proxies = proxies
- def get_token_url(self, app_name, expires='30days', write_access=True):
- return 'https://trello.com/1/authorize?key=%s&name=%s&expiration=%s&response_type=token&scope=%s' % (self._apikey, quote_plus(app_name), expires, 'read,write' if write_access else 'read')
+ def get_token_url(self, app_name, expires='30days', write_access=True, scope_override = ''):
+ scope = ''
+ if scope_override != '':
+ scope = scope_override
+ else:
+ scope = 'read,write' if write_access else 'read'
+ return 'https://trello.com/1/authorize?key=%s&name=%s&expiration=%s&response_type=token&scope=%s' % (self._apikey, quote_plus(app_name), expires, scope)
def get(self, urlPieces, arguments = None):
return self._http_action('get',urlPieces, arguments)
|
Loading...