获取存档卡

时间:2019-08-15 18:18:30

标签: python trello

我正在将trello api用于python(py-trello),我需要获取特定列表中甚至存档文件中存在的所有卡。

我尝试使用列表中的list_cards()方法列出所有卡。

all_boards = client.list_boards()
wls_board = all_boards[1]
my_lists = wls_board.list_lists()

for list in my_lists:
    for card in list.list_cards():
        if "Done" in card.name: print(card.name)

该方法仅返回未归档的卡。有没有办法使用py-trello获取已存档的卡片?

1 个答案:

答案 0 :(得分:1)

只需在文档中找到解决方案即可。

方法list_cards()的参数card_filter默认设置为“打开”,因此我只需要将其更改为“全部”即可。

list_cards(card_filter=’all’)