def __init__(self):
     self.config = load_config("config/leankit-config.yaml")
     board_id = self.config['board_id']
     self.kb = LeankitKanban(self.config['account'], self.config['email'],
                             self.config['password'])
     self.log.debug("Connecting to Leankit board {0}".format(board_id))
     self.board = self.kb.get_board(board_id=board_id)
class LeanKit:
    kb = None
    log = logging.getLogger(__name__)

    def __init__(self):
        self.config = load_config("config/leankit-config.yaml")
        board_id = self.config['board_id']
        self.kb = LeankitKanban(self.config['account'], self.config['email'],
                                self.config['password'])
        self.log.debug("Connecting to Leankit board {0}".format(board_id))
        self.board = self.kb.get_board(board_id=board_id)

    def find_completed_card_ids(self):
        lanes = self.config['completed_lanes']
        card_ids = self.board.cards_with_external_ids(lanes)
        self.log.info("Found {0} cards in completed lanes".format(len(card_ids)))
        card_ids = card_ids + self.find_completed_cards_in_taskboards()
        self.log.debug("Completed cards with external ids: {0}".format(card_ids))
        return card_ids

    def find_completed_cards_in_taskboards(self):
        taskboard_cards = self.board.done_taskboard_cards()
        self.log.info("Found {0} completed cards in taskboards".format(len(taskboard_cards)))
        return taskboard_cards

    def card_exists(self, identifier):
        return identifier in self.board.external_ids

    def add_cards(self, cards):
        return self.board.add_cards(cards)
class LeanKit:
    kb = None
    log = logging.getLogger(__name__)

    def __init__(self):
        self.config = load_config("config/leankit-config.yaml")
        board_id = self.config['board_id']
        self.kb = LeankitKanban(self.config['account'], self.config['email'],
                                self.config['password'])
        self.log.debug("Connecting to Leankit board {0}".format(board_id))
        self.board = self.kb.get_board(board_id=board_id)

    def find_completed_card_ids(self):
        lanes = self.config['completed_lanes']
        card_ids = self.board.cards_with_external_ids(lanes)
        self.log.debug("Found {0} cards in completed lanes".format(
            len(card_ids)))
        card_ids = card_ids + self.find_completed_cards_in_taskboards()
        self.log.debug(
            "Completed cards with external ids: {0}".format(card_ids))
        return card_ids

    def find_completed_cards_in_taskboards(self):
        taskboard_cards = self.board.done_taskboard_cards()
        self.log.debug("Found {0} completed cards in taskboards".format(
            len(taskboard_cards)))
        return taskboard_cards

    def card_exists(self, identifier):
        return identifier in self.board.external_ids

    def add_cards(self, cards):
        return self.board.add_cards(cards)
 def __init__(self):
     self.config = load_config("config/leankit-config.yaml")
     board_id = self.config['board_id']
     self.kb = LeankitKanban(self.config['account'], self.config['email'],
                             self.config['password'])
     self.log.debug("Connecting to Leankit board {0}".format(board_id))
     self.board = self.kb.get_board(board_id=board_id)