its-rigs / Trolly

A Python wrapper around the Trello API. Provides a group of Python classes to represent Trello Objects. All classes come with basic Trello API method calls and are easily extensible to suit your needs. See the README for more details.
MIT License
100 stars 29 forks source link

How to get a list of all available boards? #23

Closed wolph closed 9 years ago

wolph commented 9 years ago

Perhaps there is one, but I can't find it in the code anywhere.

It seems the client only has methods for creating objects, not for getting them: https://github.com/plish/Trolly/blob/master/trolly/client.py And the board doesn't have any classmethods to generate them either. THe board constructor requires a board_id so that's no option either.

Did I miss anything?

its-rigs commented 9 years ago

The top level I use is organisation, which doesn't allow you to get a list of lists but it does allow you to get all boards. Alternatively you could use member, which will allow you to get all boards.

I have had a little look around but can't find a method for getting all lists in one call.

The client is used for making calls, all get requests use the fetch_json method, which is call from the various methods inside the trello object.

Hope that helps. Any other questions let me know.

wolph commented 9 years ago

I'm working on a little modification of Trolly so you can easily get "your" info from the client (the /me/ member and related info for example).

With a bit of luck I can add a pull-request later today

its-rigs commented 9 years ago

You could look at passing me as the member_id to the member class. I believe that would show you all member information?

its-rigs commented 9 years ago

Just did a quick test using Member(client, 'me') and then calling get_boards and this returns all boards.

wolph commented 9 years ago

I've just created a pull request which addresses the issues, adds some more docs and makes usage generally a bit more convenient (for me at least).

Let me know what you think :)

wolph commented 9 years ago

Link: #24