Total Complexity | 3 |
Total Lines | 13 |
Duplicated Lines | 0 % |
1 | from lib import action |
||
4 | class AddCardAction(action.BaseAction): |
||
5 | def run(self, name, board_id, list_id, description=None, api_key=None, token=None): |
||
6 | if api_key: |
||
7 | self._set_creds(api_key=api_key, token=token) |
||
8 | |||
9 | board = self._client().get_board(board_id) |
||
10 | lst = board.get_list(list_id) |
||
11 | card = lst.add_card(name=name, desc=description) |
||
12 | |||
13 | if card: |
||
14 | return card.id |
||
15 | else: |
||
16 | return False |
||
17 |