Skip to content

Spring Boot app that can consume NHL team and player statistics

Notifications You must be signed in to change notification settings

pgrimard/nhl-stats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NHL Statistics

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.

Endpoints

Teams

/teams?seasonId=20182019

This endpoint returns team stats for the given seasonId.

  1. seasonId = The season requested, ex: 20182019

Conference

/conference?seasonId=20182019

This endpoint returns conference stats for the given seasonId.

  1. seasonId = The season requested, ex: 20182019

Players

/players?seasonId=20182019&gameTypeId=2

This endpoint returns player stats for the given seasonId and gameTypeId.

  1. seasonId = The season requested, ex: 20182019

  2. gameTypeId = The game type requested, regular season is 2 while playoff season is 3

Configuration

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

Troubleshooting NHL Endpoints

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.

About

Spring Boot app that can consume NHL team and player statistics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages