Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capable of doing more complex queries. #116

Open
omarps opened this issue Jan 22, 2015 · 0 comments
Open

Capable of doing more complex queries. #116

omarps opened this issue Jan 22, 2015 · 0 comments

Comments

@omarps
Copy link

omarps commented Jan 22, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants