Total Complexity | 3 |
Total Lines | 17 |
Duplicated Lines | 0 % |
1 | from lib import action |
||
4 | class ViewCardsAction(action.BaseAction): |
||
5 | def run(self, board_id, list_id, api_key=None, token=None): |
||
6 | if api_key: |
||
7 | self._set_creds(api_key=api_key, token=token) |
||
8 | |||
9 | cards = {} |
||
10 | board = self._client().get_board(board_id) |
||
11 | lst = board.get_list(list_id) |
||
12 | for card in lst.list_cards(): |
||
13 | cards[card.id] = { |
||
14 | 'name': card.name, |
||
15 | 'description': card.desc, |
||
16 | 'url': card.url, |
||
17 | 'closed': card.closed, |
||
18 | } |
||
19 | |||
20 | return cards |
||
21 |