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

查看:28
本文介绍了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:

GET/1/成员/[idMember 或用户名]/boards

返回(截断以仅显示我们关心的部分):

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

<代码>[{"id": "4eea4ffc91e31d1746000046","name": "示例板","desc": "此板用于 API 示例",..."shortUrl": "https://trello.com/b/OXiBYZoj"}, {"id": "4ee7e707e582acdec800051a","name": "公共板","desc": "一个人人都能看到的棋盘",..."shortUrl": "https://trello.com/b/IwLRbh3F"}]

然后获取每个板的列表:

Then get the lists for each board:

GET/1/boards/[board_id]/lists

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

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

<代码>[{"id": "4eea4ffc91e31d174600004a","name": "待办事项",...}, {"id": "4eea4ffc91e31d174600004b","name": "做",...}, {"id": "4eea4ffc91e31d174600004c","name": "完成",...}]

并针对每个董事会完成此回复,以构建用户或组织拥有的所有列表的列表.

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天全站免登陆