Skip to content

Commit

Permalink
Merge pull request #229 from rbrady/master
Browse files Browse the repository at this point in the history
Adds method to delete label from board
  • Loading branch information
sarumont committed Mar 20, 2018
2 parents 9337660 + 64a1de3 commit 6f10cfa
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions trello/board.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,19 @@ def add_label(self, name, color):
post_args={'name': name, 'idBoard': self.id, 'color': color}, )
return Label.from_json(board=self, json_obj=obj)

def delete_label(self, label_id):
"""Delete a label from this board
:label_id: the ID of the label to delete.
:return: the label
:rtype: json
"""
json_obj = self.client.fetch_json(
'/labels/{0}'.format(label_id),
http_method='DELETE',
post_args={'id': label_id}, )
return json_obj

def all_cards(self):
"""Returns all cards on this board
Expand Down

0 comments on commit 6f10cfa

Please sign in to comment.