ruby-trello
ruby-trello copied to clipboard
Capable of doing more complex queries.
At this point it's not possible to use more complex queries to reduce the number of requests and improve the overall performance. Ex. In Javascript I can do this:
Trello.get("organizations/[my_company]/boards?filter=open&fields=name,url&lists=open&list_fields=idBoard,name", function(boards) {
$.each(boards, function(ix, board) {
$.each(board.lists, function(ix, list) {
// It's possible to navigate from organization's boards to lists in a single get.
}
}
});
But in ruby-trello I'm limited to:
org = Trello::Organization.find("my_company", {"filter" => "open", "fields" => "name,url", "lists" => "open", "list_fields" => "idBoard,name"})
org.boards.each do |b|
board = Trello::Board.find(b.id, {})
board.lists.each do |list|
// the more boards the more gets
end
end
In this comparison I went down to boards, but this gets more complicated if I'd want also the cards, checklists, and members details.