Had a need to look into a Trello board’s activity and thought I would blog the first of some “recipes” I am coming up with.
To start it off, I wrote some trivial functions to format Trello URLs (as they appear today) to return the JSON representation of the board, and return some basic information about the activity that recently occurred.
This Gist is not a full fledged module as of yet, just a bag of functions and a little extra code. On line 54 I define a hash of boards and then break out the activity and cards updated in the last 10 days.
More than anything this code had me diving deeper with JSON, spending some time figuring out what I could do with PowerShell Format Expressions, and a bit of checking/capturing the implicit type conversions PowerShell loves to throw at me.
I know there is more to do here and I could be significantly more terse, could remove the hash table, and the naming might not work if they provide a url without the pretty printing, so I could definitely add more sanity checking in the Format-TrelloUriToJson function.