From 2ec62cd6aed8feccfa8ede2e5c3a170ca8815d1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20J=2E=20Romero=20L=C3=B3pez?= Date: Sun, 9 Oct 2016 02:03:02 +0200 Subject: [PATCH] Saves a new Trello board --- trello/board.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/trello/board.py b/trello/board.py index ded27d1e..900e4530 100644 --- a/trello/board.py +++ b/trello/board.py @@ -83,8 +83,15 @@ def fetch(self): except: self.date_last_activity = None + # Saves a Trello Board def save(self): - pass + json_obj = self.client.fetch_json( + '/boards/', + http_method='POST', + post_args={'name': self.name, "desc": self.description}, ) + # Set initial data from Trello + self.from_json(json_obj=json_obj) + self.id = json_obj["id"] def close(self): self.client.fetch_json(