def get_label(self, label_id, board_id): '''Get Label Requires the parent board id the label is on :rtype: Label ''' board = self.get_board(board_id) label_json = self.fetch_json('/labels/' + label_id) return Label.from_json(board, label_json)
def get_label(self, label_id, board_id): """Get Label Requires the parent board id the label is on :rtype: Label """ board = self.get_board(board_id) label_json = self.fetch_json('/labels/' + label_id) return Label.from_json(board, label_json)
def add_label(self, name, color): """Add a label to this board :name: name of the label :color: the color, either green, yellow, orange red, purple, blue, sky, lime, pink, or black :return: the label :rtype: Label """ obj = self.client.fetch_json( '/labels', http_method='POST', post_args={'name': name, 'idBoard': self.id, 'color': color},) return Label.from_json(board=self, json_obj=obj)