Trello » TrelloSimple A very simple helper for the Trello API in Python Read More
Clone URL:  
Pushed to one repository · View In Graph Contained in tip

tip Add proxy exmample (fiddler) and add scope_override option to explicitly set the scope.

Changeset eeef45bd880a

Parent 449230ad6594

by Profile picture of User 476Ben McCormack <benm@fogcreek.com>

Changes to one file · Browse files at eeef45bd880a Showing diff from parent 449230ad6594 Diff from another changeset...

Change 1 of 1 Show Entire File trelloSimple.py Stacked
 
16
17
18
 
19
20
21
22
 
 
 
 
 
 
 
23
24
25
 
16
17
18
19
20
21
 
 
22
23
24
25
26
27
28
29
30
31
@@ -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)