summaryrefslogtreecommitdiff
path: root/ick2/buildsapi.py
diff options
context:
space:
mode:
Diffstat (limited to 'ick2/buildsapi.py')
-rw-r--r--ick2/buildsapi.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/ick2/buildsapi.py b/ick2/buildsapi.py
index 9ee00b7..3441027 100644
--- a/ick2/buildsapi.py
+++ b/ick2/buildsapi.py
@@ -21,6 +21,35 @@ class BuildsAPI(ick2.ResourceApiBase): # pragma: no cover
def __init__(self, state):
super().__init__('builds', 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['build']