From 98a20a1eab377842113bf934dc71b3eb35246629 Mon Sep 17 00:00:00 2001 From: Hark Date: Fri, 21 Aug 2015 20:38:44 +0100 Subject: [PATCH] Add remove_label function to card Adds a remove_label function to Card that allows for removal of labels by passing the appropriate label object to the function. --- trello/card.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/trello/card.py b/trello/card.py index ace3a719..2cd5bca1 100644 --- a/trello/card.py +++ b/trello/card.py @@ -308,6 +308,11 @@ def add_label(self, label): http_method='POST', post_args={'value': label.id}) + def remove_label(self, label): + self.client.fetch_json( + '/cards/' + self.id + '/idLabels/' + label.id, + http_method='DELETE') + def attach(self, name=None, mimeType=None, file=None, url=None): """ Add an attachment to the card. The attachment can be either a