Skip to content

Commit

Permalink
Created board_status_info controller class.
Browse files Browse the repository at this point in the history
Created board_status_info_api for connecting to the endpoint.
  • Loading branch information
DLTADragonHawk committed May 29, 2024
1 parent 9c752a4 commit bf7edd6
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
16 changes: 16 additions & 0 deletions connectpyse/service/board_status_info.py
Original file line number Diff line number Diff line change
@@ -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)
17 changes: 17 additions & 0 deletions connectpyse/service/board_status_info_api.py
Original file line number Diff line number Diff line change
@@ -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()

0 comments on commit bf7edd6

Please sign in to comment.