Hi, thanks for the suggestion. Would the badge show counts, or just link to the board?
Would you like to make a pull request?
Awesome idea, I think the badge should just link to the board.
I've started some work on this.
I was thinking of something like GitHub's issues by-label badge for cards in Trello.
Some ideas:
Other idea(s):
A badge that doesn鈥檛 show any dynamic info is static; that can be done using our static badge.
For total cards, do you have a use case in mind?
Good to know about the static badge. As for the total cards badge, I would add it to this project and have it link to this board. I like the idea of a total cards badge because I don't follow the burn down style and total cards would give an indication of how many tasks there were to do.
Gotcha, so cards get archived once they are done.
That's correct!
Hi guys!
The other day I was searching for this feature and since there was nothing implemented I implemented something myself in a couple of hours and deployed it on Heroku to use it in my project.
What I've implemented so far is an API that sumarizes the trello board into counts and filters the lists by query. For instance if I want to get the counts in the Ready and Working lists I query with "boardId?show=Ready,Working" and it will return something like {message: "Ready: X, Working: Y"}.
Then, I use this information in a dynamic badge based in json data resulting in a badge like this (if it doesn't show probably the Heroku project is asleep, so refresh):
The full API features include:
I've been thinking into extend the functionallity, adding the features mentioned here and some others. Then adapt the code according to the contributions section, add some tests, and create a pull request.
The code can be found here: https://github.com/Victorma/trello-badge-summary/blob/master/index.js
Do you think it would be suitable for the shields project? Also since I'm faking the user agent (to avoid the ussage of api keys just for querying) I would like to have some guidelines on how to address this issue (leave it like that, make each user to provide their own api keys or use one provide by the shields owner).
Thanks ahead,
I'm looking forward to contribute! :)
Regarding Trello's API keys, they are _supposed_ to be required but I got away without using them at all (using the default Shields.io user agent in a badge and curl on a linux box) so we might be good there but we would need to test that a little further.
However, if it turns out that they are required then we shouldn't be including them in the code, instead putting them as server secrets (so that self-hosters can input their own key to use private boards and to circumvent rate limits)
+1
Hi! Please post :+1: reactions to the top post rather than +1 comments, as the comments generate noise. Thanks!
Most helpful comment
I've started some work on this.
I was thinking of something like GitHub's issues by-label badge for cards in Trello.