Skip to content

Commit

Permalink
Merge pull request #28 from DLTADragonHawk/info-endpoint
Browse files Browse the repository at this point in the history
Added Board Info API
  • Loading branch information
markciecior authored May 17, 2024
2 parents efad655 + 9a8170a commit 2091a2b
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
23 changes: 23 additions & 0 deletions connectpyse/service/board_info.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from ..cw_model import CWModel


class BoardInfo(CWModel):

def __init__(self, json_dict=None):
self.id = None # (Integer)
self.name = None # *(String(50))
self.locationId = None # *(Integer)
self.businessUnitId = None # *(Integer)
self.inactive = None # (Boolean)
self.signOffTemplate = None # (ServiceSignoffReference)
self.sendToContact = None # (Boolean)
self.contactTemplateId = None # (Integer)
self.sendToResource = None # (Boolean)
self.resourceTemplateId = None # (Integer)
self.projectFlag = None # (Boolean)
self.showDependenciesFlag = None # (Boolean)
self.showEstimatesFlag = None # (Boolean)
self._info = None # (Metadata)

# initialize object with json dict
super().__init__(json_dict)
20 changes: 20 additions & 0 deletions connectpyse/service/boards_info_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from ..cw_controller import CWController
# Class for /service/info/boards
from . import board_info


class BoardsInfoAPI(CWController):
def __init__(self, **kwargs):
self.module_url = 'service'
self.module = 'info/boards'
self._class = board_info.BoardInfo
super().__init__(**kwargs) # instance gets passed to parent object

def get_boards_info(self):
return super()._get()

def get_boards_info_count(self):
return super()._get_count()

def get_board_info_by_id(self, entry_id):
return super()._get_by_id(entry_id)

0 comments on commit 2091a2b

Please sign in to comment.