From 3c8014b53a2fa5e62956c830a904948b08bb37ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20J=2E=20Romero=20L=C3=B3pez?= Date: Wed, 17 Aug 2016 20:04:02 +0200 Subject: [PATCH] Add list position attribute (pos) to list. This attribute is fetched by default when calling Board.get_lists --- trello/trellolist.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/trello/trellolist.py b/trello/trellolist.py index 7f787bc6..5fe36cdf 100644 --- a/trello/trellolist.py +++ b/trello/trellolist.py @@ -19,6 +19,8 @@ def __init__(self, board, list_id, name=''): self.client = board.client self.id = list_id self.name = name + self.closed = None + self.pos = None @classmethod def from_json(cls, board, json_obj): @@ -30,6 +32,7 @@ def from_json(cls, board, json_obj): """ list = List(board, json_obj['id'], name=json_obj['name']) list.closed = json_obj['closed'] + list.pos = json_obj['pos'] return list def __repr__(self): @@ -40,6 +43,7 @@ def fetch(self): json_obj = self.client.fetch_json('/lists/' + self.id) self.name = json_obj['name'] self.closed = json_obj['closed'] + self.pos = json_obj['pos'] def list_cards(self, card_filter="open"): """Lists all cards in this list"""