Skip to content
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

Game Types? #23

Open
m0ngr31 opened this issue Apr 28, 2024 · 1 comment
Open

Game Types? #23

m0ngr31 opened this issue Apr 28, 2024 · 1 comment

Comments

@m0ngr31
Copy link

m0ngr31 commented Apr 28, 2024

On the old API, I was able to get a list of all the regular season and playoff games by doing:

https://statsapi.web.nhl.com/api/v1/schedule?season=20152016&gameType=R or https://statsapi.web.nhl.com/api/v1/schedule?season=20152016&gameType=P

With the new API (thanks to a comment here), I was able to get a list of games from a season like: https://api.nhle.com/stats/rest/en/game?cayenneExp=season=20152016, but I'm trying to figure out how to filter only regular season and playoff games. I'm assuming it's the gameType property, but to be sure, does anyone have a list of those?

@alanryder
Copy link

I believe this would work:
https://api.nhle.com/stats/rest/en/game?cayenneExp=season=20152016%20and%20gameTypeId={game_type}

where game_type = 1 (preseason), 2 (regular season), 3 (playoffs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants