This service is used as a gateway to fetch statistics from the NHL website. Although you could call the various endpoints that NHL exposes directly, the goal of this project is to keep a consistent API in the event the NHL endpoints change.
/teams?seasonId=20182019
This endpoint returns team stats for the given seasonId
.
-
seasonId
= The season requested, ex:20182019
/conference?seasonId=20182019
This endpoint returns conference stats for the given seasonId
.
-
seasonId
= The season requested, ex:20182019
This service will attempt to register with a Eureka server at the default location http://localhost:8761
. If a
connection is established, then it will attempt to fetch its configuration from a registered config server.
The following properties are required in order to call the various endpoints. They can be configured locally or as program arguments if a Eureka and config server are not available.
stats:
api:
teams: http://www.nhl.com/stats/rest/team?isAggregate=false&reportType=basic&isGame=false&reportName=teamsummary
conference: https://statsapi.web.nhl.com/api/v1/standings
players: http://www.nhl.com/stats/rest/skaters?reportType=basic&reportName=skatersummary
These are the underlying endpoints called by this service. These may be useful if you need to make sure the NHL service is still operating correctly, or if they’ve made changes, as they seem to do every year.
-
Team regular season stats - http://www.nhl.com/stats/rest/team?isAggregate=false&reportType=basic&isGame=false&reportName=teamsummary&cayenneExp=seasonId=20182019%20and%20gameTypeId=2
-
Conference stats - https://statsapi.web.nhl.com/api/v1/standings?seasonId=20182019
-
Player regular season stats - http://www.nhl.com/stats/rest/skaters?reportType=basic&reportName=skatersummary&cayenneExp=seasonId=20182019%20and%20gameTypeId=2
-
Player playoff season stats - http://www.nhl.com/stats/rest/skaters?reportType=basic&reportName=skatersummary&cayenneExp=seasonId=20182019%20and%20gameTypeId=3