diff options
author | Lars Wirzenius <liw@liw.fi> | 2017-10-16 21:01:55 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-10-16 21:01:55 +0300 |
commit | 36a2b7cf4f38ee3ac837eb12213658cb2362baa2 (patch) | |
tree | 23803b861e4c88ebae91f102f77852fbdfd036c0 /icktool | |
parent | 5340eaeb454b454b12caeb28be29a6d282c9f4f2 (diff) | |
download | ick2-36a2b7cf4f38ee3ac837eb12213658cb2362baa2.tar.gz |
Add: scopes for /projects
Diffstat (limited to 'icktool')
-rwxr-xr-x | icktool | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -26,11 +26,22 @@ import requests import ick2 +def scopes(base): + patterns = [ + 'uapi_{}_get', + 'uapi_{}_post', + 'uapi_{}_id_get', + 'uapi_{}_id_put', + 'uapi_{}_id_delete', + ] + return [x.format(base) for x in patterns] + + class Icktool(cliapp.Application): _default_scopes = [ 'uapi_version_get', - ] + ] + scopes('projects') def add_settings(self): self.settings.string( |