During a bout of boredom recently I set out to create a module for the Sopel bot framework to gather information about hockey games since a bunch of the guys on my IRC server are hockey fans to one degree or another. Apparently there are lots of betting and analytic services out there that provide APIs however they all seem to charge or have some gimped up scheme for accessing the data, I easily spent a few hours searching around trying to find something that didn’t suck. Finally I stumbled upon the work of Kevin Sidwar who partially documented some of the actual NHL API which provides game data. Fast forward a few days of clicking and clacking about in vim and I managed to churn out a semi-functional module that will drop right into Sopel without any configuration at all.
Hockeystats is about as simple as it can get, having a grand total of 4 callable functions to grab previous game details, next game details, team stats and division standings. I made sure to make it a little picky about user input so the risk of user abuse is fairly low and also tossed in docstring documentation so that the !help command will work for each function in the module. A word of warning however, this is one of my fastest projects so far so its not gone beyond a smoke test and there aren’t any rate limits on commands so user beware and all that.