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

[Feature Request] Allow finding boards for an organization instead of member #313

Open
qdegraeve opened this issue Dec 20, 2023 · 4 comments
Assignees
Labels

Comments

@qdegraeve
Copy link

Hello,

On my app, I need to fetch all boards of my organization workspace and not only the boards that my API user has joined.
To do this I had to do the following code because Trello::Board.all is scoped on Trello::Member.find(:me) :

    boards = Trello::Board.from_response(
      Trello::Board.client.get("/organizations/[my org ID]/boards", filter: "open", fields: "id,name")
    )

Also this code allowed me to pass query parameters as mentioned in the API documentation and made the request a lot lighter and faster.

Maybe Trello::Board.all could accept extra parameters to allow another scope and query parameters ?

Regards
Quentin

@hoppergee hoppergee self-assigned this Dec 21, 2023
@hoppergee
Copy link
Collaborator

I'll take a look in the next few days.

@hoppergee
Copy link
Collaborator

hoppergee commented Dec 21, 2023

We have an API to fetch all boards of an organization(workspace)

organization = Trello::Organization.find(org_id)
boards = organization.boards

But it's using a legacy API /organizations/#{id}/boards/all which doesn't support query parameters. I will fix it to use /organizations/#{id}/boards with parameter support.

@hoppergee
Copy link
Collaborator

hoppergee commented Dec 21, 2023

@qdegraeve I just bump to v4.2.0. Now you can use query paramters:

organization = Trello::Organization.find(org_id)
boards = organization.boards(filter: "open", fields: "id,name")

Please have a test and hope it can help.

@qdegraeve
Copy link
Author

Thank you very much, I'll give it a try.

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

No branches or pull requests

2 participants