diff options
author | Lars Wirzenius <liw@liw.fi> | 2018-01-19 19:16:57 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-01-19 19:16:57 +0200 |
commit | 66fe1de8368ba7e754fa6dad798bf351f3c3bf93 (patch) | |
tree | e1e410beeaa3264212f2760debfbcfeebd46c50d /ick2/logapi.py | |
parent | 3bc16ac24091009e73d9c4b9c2fbda0cdca6cff5 (diff) | |
download | ick2-66fe1de8368ba7e754fa6dad798bf351f3c3bf93.tar.gz |
Change: builds are now numbered foo/123, as are logs
Diffstat (limited to 'ick2/logapi.py')
-rw-r--r-- | ick2/logapi.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/ick2/logapi.py b/ick2/logapi.py index 37bf6aa..fde9477 100644 --- a/ick2/logapi.py +++ b/ick2/logapi.py @@ -21,6 +21,35 @@ class LogAPI(ick2.ResourceApiBase): # pragma: no cover def __init__(self, state): super().__init__('log', state) + def get_routes(self, path): + return [ + { + 'method': 'POST', + 'path': path, + 'callback': self.POST(self.create), + }, + { + 'method': 'GET', + 'path': path, + 'callback': self.GET(self.list), + }, + { + 'method': 'GET', + 'path': '{}/<name:path>'.format(path), + 'callback': self.GET(self.show), + }, + { + 'method': 'PUT', + 'path': '{}/<name:path>'.format(path), + 'callback': self.PUT(self.update), + }, + { + 'method': 'DELETE', + 'path': '{}/<name:path>'.format(path), + 'callback': self.DELETE(self.delete), + }, + ] + def get_resource_name(self, resource): return resource['log'] |