-
Notifications
You must be signed in to change notification settings - Fork 56
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
Stats beyond the skater summary? #16
Comments
Unfortunately I've yet to find where this information is accessed in this API, however there is a second one that drives the advanced stats and reports available from the NHL website. I haven't managed to really get much from it yet however, but a good start would be to check out http://www.nhl.com/stats/rest/skaters?isAggregate=false&reportType=basic&isGame=false&reportName=skatersummary&sort=%5B%7B%22property%22:%22points%22,%22direction%22:%22DESC%22%7D%5D&cayenneExp=gameTypeId=2%20and%20seasonId=20162017 and then see if you can figure out how to make it show the correct report type which I haven't had any luck on yet |
Thanks for the tip. With a little intuition I was able to make your suggestion work! Just switched out the reportName parameter of the rest api for what is shown as the report parameter in the URL of the NHL stats web page for the report selection you want. You'll need to update the sort parameters or remove them altogether. Examples below. Hits, blocks, takeaways, etc. SAT percentages: I suspect all different reports on the web site are available through the rest api using this method. Thanks again! |
Here we go. Needed to change the reportType parameter as well as the reportName. Hat tip to one of the responders in your reddit thread about a month ago. |
Awesome, think I'm going to have to start another document to cover this advanced stats API section, its a lot more flexible than the other API which seems more for game data than anything else. |
I also found this repo which may help with understanding how to query the NHL REST API: It doesn't document the NHL specific endpoints and parameters, but there is documentation on the framework used in the API. I haven't had a chance to look closely. Currently trying to figure out how to aggregate a game by game report and sum the last x number of days for a report as you can from the web site. Not much success so far. |
Do you have an idea how to query to include stats like face off wins and takeaways by player? I can only find them in the game/boxscore endpoint. Thanks! This documentation is fantastic!
The text was updated successfully, but these errors were encountered: