Guest User

Untitled

a guest
Jul 17th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. class DataFromTrello():
  2. def __init__(self):
  3. self.client = TrelloClient(api_key="...",api_secret="...",token="...")
  4. self.boards = self.client.list_boards(board_filter='starred')
  5. self.array = pd.DataFrame(np.object, index=[], columns=[])
  6. def get_cards_from_board(self, board):
  7. t = []
  8. lists = board.list_lists(self)
  9. for l in lists:
  10. cards = l.list_cards(self)
  11. for c in cards:
  12. t.append(c)
  13. return t
  14.  
  15. AttributeError: module 'trello.board' has no attribute 'list_lists'
  16.  
  17. class DataFromTrello():
  18. def __init__(self):
  19. self.client = TrelloClient(api_key="...", api_secret="...",token="...")
  20. self.boards = self.client.list_boards(board_filter='starred')
  21. self.array = pd.DataFrame(np.object, index=[], columns=[])
  22.  
  23. def cards_from_board(self, board):
  24. print(type(board))
  25. assert isinstance(board, object)
  26. t = []
  27. lists = board.list_lists()
  28. for l in lists:
  29. if l.name == 'Done':
  30. cards = l.list_cards()
  31. for c in cards:
  32. t.append(c)
  33. return t
Add Comment
Please, Sign In to add comment