Trello API:获取板/列表/卡信息 [英] Trello API: getting boards / lists / cards information

查看:127
本文介绍了Trello API:获取板/列表/卡信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Trello API: -我已经能够获得分配给Trello用户的所有卡 -我已经能够获得分配给组织的所有董事会

Using Trello API: - I've been able to get all the cards that are assigned to a Trello user - I've been able to get all the boards that are assigned to an Organization

但是我无法获得任何返回组织或用户中所有列表的API调用. 是否有任何允许的功能?

But I can't get any API call that returns all the lists that are in an Organization or User. Is there any function that allows that ?

预先感谢

推荐答案

我不相信 Trello API 为此,因此您必须获取用户或组织的董事会列表:

I don't believe there is a method in the Trello API to do this, so you'll have to get a list of boards for a user or organization:

获取/1/成员/[idMember或用户名]/论坛

哪些回报(被截断以仅显示我们关心的部分):

Which returns (truncated to show just the parts we care about):

[{ "id": "4eea4ffc91e31d1746000046", "name": "Example Board", "desc": "This board is used in the API examples", ... "shortUrl": "https://trello.com/b/OXiBYZoj" }, { "id": "4ee7e707e582acdec800051a", "name": "Public Board", "desc": "A board that everyone can see", ... "shortUrl": "https://trello.com/b/IwLRbh3F" }]

[{ "id": "4eea4ffc91e31d1746000046", "name": "Example Board", "desc": "This board is used in the API examples", ... "shortUrl": "https://trello.com/b/OXiBYZoj" }, { "id": "4ee7e707e582acdec800051a", "name": "Public Board", "desc": "A board that everyone can see", ... "shortUrl": "https://trello.com/b/IwLRbh3F" }]

然后获取每个板的列表:

Then get the lists for each board:

获取/1/boards/[board_id]/列表

返回哪个(被截断以仅显示列表ID和名称:

Which returns (truncated to only show the list id and name:

[{ "id": "4eea4ffc91e31d174600004a", "name": "To Do Soon", ... }, { "id": "4eea4ffc91e31d174600004b", "name": "Doing", ... }, { "id": "4eea4ffc91e31d174600004c", "name": "Done", ... }]

[{ "id": "4eea4ffc91e31d174600004a", "name": "To Do Soon", ... }, { "id": "4eea4ffc91e31d174600004b", "name": "Doing", ... }, { "id": "4eea4ffc91e31d174600004c", "name": "Done", ... }]

然后针对每个委员会进行此响应,以构建用户或组织拥有的所有列表的列表.

And go through this response for each board to build a list of all the lists a user or organization has.

这篇关于Trello API:获取板/列表/卡信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆