diff --git a/connectpyse/service/board_status_info.py b/connectpyse/service/board_status_info.py new file mode 100644 index 0000000..c71b32e --- /dev/null +++ b/connectpyse/service/board_status_info.py @@ -0,0 +1,16 @@ +from ..cw_model import CWModel + + +class BoardStatusInfo(CWModel): + + def __init__(self, json_dict=None): + self.id = None # (Integer) + self.name = None # *(String(50)) + self.sortOrder = None # (Integer) + self.defaultFlag = None # (Boolean) + self.inactiveFlag = None # (Boolean) + self.closedFlag = None # (Boolean) + self._info = None # (Metadata) + + # initialize object with json dict + super().__init__(json_dict) diff --git a/connectpyse/service/board_status_info_api.py b/connectpyse/service/board_status_info_api.py new file mode 100644 index 0000000..d4780da --- /dev/null +++ b/connectpyse/service/board_status_info_api.py @@ -0,0 +1,17 @@ +from ..cw_controller import CWController +# Class for /service/boards{}/statuses/info +from . import board_status_info + + +class BoardsStatusInfoAPI(CWController): + def __init__(self, board_id, **kwargs): + self.module_url = 'service' + self.module = 'boards/{}/statuses/info'.format(board_id) + self._class = board_status_info.BoardStatusInfo + super().__init__(**kwargs) # instance gets passed to parent object + + def get_board_statuses(self): + return super()._get() + + def get_count_board_statuses(self): + return super()._get_count()