-
Notifications
You must be signed in to change notification settings - Fork 16
/
controller_template.txt
32 lines (23 loc) · 1022 Bytes
/
controller_template.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from ..cw_controller import CWController
# Class for /company/configurations
from . import configuration
class ConfigurationsAPI(CWController):
def __init__(self):
self.module_url = 'company'
self.module = 'configurations'
self._class = configuration.Configuration
super().__init__() # instance gets passed to parent object
def get_configurations(self):
return super()._get()
def create_configuration(self, a_configuration):
return super()._create(a_configuration)
def get_configurations_count(self):
return super()._get_count()
def get_configuration_by_id(self, configuration_id):
return super()._get_by_id(configuration_id)
def delete_configuration_by_id(self, configuration_id):
super()._delete_by_id(configuration_id)
def replace_configuration(self, configuration_id):
pass
def update_configuration(self, configuration_id, key, value):
return super()._update(configuration_id, key, value)