forked from joshuamsmith/ConnectPyse
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from DLTADragonHawk/info-status-endpoint
Created board_status_info controller class.
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |