In the process of working on the project mentioned in my previous post I decided to try to round up all the bits and pieces of information I had found into a single place. Some of the endpoints I was using even turned out to be undiscovered as far as I can tell (such as the one for standings) so I created a repository on Gitlab to try to collect it all along with examples of data returned in cases where it was feasible to include it. The information is by no means complete as its largely a trial-and-error process to find new endpoints, however here is what I have been able to document so far in the NHL API.
If you happen find something that wasn’t included or otherwise incorrect feel free to open a PR and I will get it updated.
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.