1
0
mirror of https://gitlab.com/dword4/nhlapi synced 2024-11-22 10:34:54 +00:00

Merge pull request #14 from dword4/dword4-patch-1

adding navigation
This commit is contained in:
Drew Hynes 2018-02-15 14:31:52 -05:00 committed by GitHub
commit ae287bb4bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,34 @@ All of this has been compiled and tested by hand in Jan of 2018, prior to this m
single place. single place.
[OpenAPI 3.0 specification file for the NHL API](https://github.com/erunion/sport-api-specifications/tree/master/nhl) thanks to @[erunion](https://github.com/erunion) [OpenAPI 3.0 specification file for the NHL API](https://github.com/erunion/sport-api-specifications/tree/master/nhl) thanks to @[erunion](https://github.com/erunion)
### Teams
[Teams](#teams)
[Divisions](#divisions)
[Conferences](#conferences)
[People](#people)
[Game-IDs](#game-ids)
[Schedule](#schedule)
[Standings](#standings)
[Standings Types](#standings-types)
[Stats Types](#stats-types)
[Team Stats](#team-stats)
[Draft](#draft)
[Prospects](#prospects)
---
### <a name="teams"></a>Teams
`GET https://statsapi.web.nhl.com/api/v1/teams` Returns a list of data about `GET https://statsapi.web.nhl.com/api/v1/teams` Returns a list of data about
all teams including their id, venue details, division, conference and franchise information. all teams including their id, venue details, division, conference and franchise information.
@ -82,7 +109,7 @@ including id value, name, jersey number and position details.
}, },
``` ```
--- ---
### Divisions ### <a name="divisions"></a>Divisions
`GET https://statsapi.web.nhl.com/api/v1/divisions` Returns full list of divisions `GET https://statsapi.web.nhl.com/api/v1/divisions` Returns full list of divisions
and associated data like which conference they belong to, id values and API links. and associated data like which conference they belong to, id values and API links.
Does not show inactive divisions Does not show inactive divisions
@ -105,7 +132,7 @@ single division. This can show old inactive divisions such as 13 Patrick.
}, },
``` ```
--- ---
### Conferences ### <a name="conferences"></a>Conferences
`GET https://statsapi.web.nhl.com/api/v1/conferences` Returns conference details `GET https://statsapi.web.nhl.com/api/v1/conferences` Returns conference details
for all current NHL conferences. for all current NHL conferences.
@ -131,7 +158,7 @@ specific conference, also can look up id 7 for World Cup of Hockey.
} }
``` ```
--- ---
### People ### <a name="people"></a>People
`GET https://statsapi.web.nhl.com/api/v1/people/ID` Gets details for a player, must `GET https://statsapi.web.nhl.com/api/v1/people/ID` Gets details for a player, must
specify the id value in order to return data. specify the id value in order to return data.
```{ ```{
@ -447,7 +474,7 @@ in-progress season and shows **projected** totals based on current onPaceRegular
``` ```
--- ---
### Game ### <a name="game"></a>Game
`GET https://statsapi.web.nhl.com/api/v1/game/ID/feed/live` Returns all data about `GET https://statsapi.web.nhl.com/api/v1/game/ID/feed/live` Returns all data about
a specified game id including play data with on-ice coordinates and post-game a specified game id including play data with on-ice coordinates and post-game
details like first, second and third stars and any details about shootouts. The details like first, second and third stars and any details about shootouts. The
@ -465,11 +492,11 @@ multiple types of media relating to the game including videos of shots, goals an
Returns updates (like new play events, updated stats for boxscore, etc.) for the specified game ID Returns updates (like new play events, updated stats for boxscore, etc.) for the specified game ID
since the given startTimecode. If the startTimecode param is missing, returns an empty array. since the given startTimecode. If the startTimecode param is missing, returns an empty array.
#### Game IDs #### <a name="game-ids">Game IDs
The first 4 digits identify the season of the game (ie. 2017 for the 2017-2018 season). The next 2 digits give the type of game, where 01 = preseason, 02 = regular season, 03 = playoffs, 04 = all-star. The final 4 digits identify the specific game number. For regular season and preseason games, this ranges from 0001 to the number of games played. (1271 for seasons with 31 teams (2017 and onwards) and 1230 for seasons with 30 teams). For playoff games, the 2nd digit of the specific number gives the round of the playoffs, the 3rd digit specifies the matchup, and the 4th digit specifies the game (out of 7). The first 4 digits identify the season of the game (ie. 2017 for the 2017-2018 season). The next 2 digits give the type of game, where 01 = preseason, 02 = regular season, 03 = playoffs, 04 = all-star. The final 4 digits identify the specific game number. For regular season and preseason games, this ranges from 0001 to the number of games played. (1271 for seasons with 31 teams (2017 and onwards) and 1230 for seasons with 30 teams). For playoff games, the 2nd digit of the specific number gives the round of the playoffs, the 3rd digit specifies the matchup, and the 4th digit specifies the game (out of 7).
--- ---
### Schedule ### <a name="schedule">Schedule
`GET https://statsapi.web.nhl.com/api/v1/schedule` Returns a list of data about the schedule for a specified date range. If no date range is specified, returns results from the current day. `GET https://statsapi.web.nhl.com/api/v1/schedule` Returns a list of data about the schedule for a specified date range. If no date range is specified, returns results from the current day.
@ -749,14 +776,14 @@ The first 4 digits identify the season of the game (ie. 2017 for the 2017-2018 s
``` ```
--- ---
### Standings ### <a name="standings">Standings
`GET https://statsapi.web.nhl.com/api/v1/standings` Returns ordered standings data `GET https://statsapi.web.nhl.com/api/v1/standings` Returns ordered standings data
for each team broken up by divisions for each team broken up by divisions
--- ---
### Standings Types ### <a name="standings-types">Standings Types
`GET https://statsapi.web.nhl.com/api/v1/standingsTypes` Returns all the standings types `GET https://statsapi.web.nhl.com/api/v1/standingsTypes` Returns all the standings types
to be used in order do get a specific standings to be used in order do get a specific standings
@ -797,14 +824,14 @@ Returns the complete wildcard (with leaders) standings on 01/16/2018.
--- ---
### Stats Types ### <a name="stats-types">Stats Types
`GET https://statsapi.web.nhl.com/api/v1/statTypes` Returns all the stats types `GET https://statsapi.web.nhl.com/api/v1/statTypes` Returns all the stats types
to be used in order do get a specific kind of player stats to be used in order do get a specific kind of player stats
--- ---
### Team Stats ### <a name="team-stats">Team Stats
`GET https://statsapi.web.nhl.com/api/v1/teams/5/stats` Returns current season stats and the current season rankings for a specific team `GET https://statsapi.web.nhl.com/api/v1/teams/5/stats` Returns current season stats and the current season rankings for a specific team
@ -900,7 +927,7 @@ Ex:
--- ---
### Draft ### <a name="draft">Draft
`GET https://statsapi.web.nhl.com/api/v1/draft` Get round-by-round data for current year's NHL Entry Draft. `GET https://statsapi.web.nhl.com/api/v1/draft` Get round-by-round data for current year's NHL Entry Draft.
@ -931,7 +958,7 @@ Ex:
}, },
``` ```
### Prospects ### <a name="prospects">Prospects
`GET https://statsapi.web.nhl.com/api/v1/draft/prospects` Get all NHL Entry Draft prospects. `GET https://statsapi.web.nhl.com/api/v1/draft/prospects` Get all NHL Entry Draft prospects.