jeremytregunna / ruby-trello

Implementation of the Trello API for Ruby
MIT License
719 stars 238 forks source link

Finding boards via Trello::Client #294

Open keithpitty opened 4 years ago

keithpitty commented 4 years ago

I'm trying to make sense of the documentation for multiple users.

For example, it includes:

Thread.new do
  @client_bob.find(:boards, "bobs_board_id")
end

If I've created @client_bob as an instance of Trello::Client with an oauth_token and oauth_token_secret, first of all I'm surprised that there isn't a boards method that I can use via Trello::Client. Even so, in the example provided in the README, what is "bobs_board_id" supposed to be if I want to find the boards that belong to Bob?

What am I missing?

keithpitty commented 4 years ago

So I now see that I need to do the following to get many boards:

@client_bob.find_many(Trello::Board, '/members/me/boards')

It took me a bit of figuring out. Now I'm thinking that the documentation could use some improvement. However, it's late here. I'll submit a PR when I get a chance.

hoppergee commented 4 years ago

Yes, you are right. The documentation needs some improvement. I will spend some times on it in future. Also, welcome to submit a PR.

kwent commented 3 years ago

Thanks @keithpitty. Saving me some time here !