diff options
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'] |