Trello API: getting boards / lists / cards information

前端 未结 5 1353
余生分开走
余生分开走 2021-02-03 22:12

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

5条回答
  •  我寻月下人不归
    2021-02-03 23:10

    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/members/[idMember or username]/boards

    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" }]

    Then get the lists for each board:

    GET /1/boards/[board_id]/lists

    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", ... }]

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

提交回复
热议问题