Nhl.Api 1.5.0

Additional Details

All versions of this NuGet prior to version 3.0.0 no longer work due to the NHL removing their original REST API and replacing it with a new one. Please use version 3.0.0 for the latest API and features.

There is a newer version of this package available.
See the version list below for details.
dotnet add package Nhl.Api --version 1.5.0
NuGet\Install-Package Nhl.Api -Version 1.5.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Nhl.Api" Version="1.5.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Nhl.Api --version 1.5.0
#r "nuget: Nhl.Api, 1.5.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Nhl.Api as a Cake Addin
#addin nuget:?package=Nhl.Api&version=1.5.0

// Install Nhl.Api as a Cake Tool
#tool nuget:?package=Nhl.Api&version=1.5.0

Build/Test Build/Test Code Analysis NuGet Issues License Maintenance

The Official Unofficial .NET NHL API πŸ’

A C# .NET Standard 2.0 library for the .NET NHL API

Installing Nhl.Api πŸ’­

You should install Nhl.Api with NuGet:

Install-Package Nhl.Api

Or via the .NET Core command line interface:

dotnet add package Nhl.Api

Either commands, from Package Manager Console or .NET Core CLI, will download and install all required dependencies.

Implementation πŸš€

If you are using any type of a inversion of control or dependency injection library such as the built in library within .NET Core, Unity, or AutoFac. It's very simple to implement, or you can create an instance of the NhlApi class and use the API as you would like.

If you are using the built-in .NET Core dependency injection library, there is a NuGet package to easily add the Nhl.Api to your .NET application, <a href="https://github.com/Afischbacher/Nhl.Api.Extensions.Microsoft.DependencyInjection">Nhl.Api.Extensions.Microsoft.DependencyInjection</a> this extension, it's highly recommended.

Nhl.Api.Extensions.Microsoft.DependencyInjection

builder.Services.AddNhlApi();

.NET Core

builder.Services.AddTransient<INhlApi, NhlApi>();

Unity

container.RegisterType<INhlApi, NhlApi>();

AutoFac

builder.RegisterType<NhlApi>().As<INhlApi>();

Simple Object Instantiation

var nhlApi = new NhlApi();

Documentation πŸ“–

Once registered using your dependency injection library of choice or just using the simple instance of the NHL API. Explore the API and see the all the possibilities.

Contents

<a name='T-Nhl-Api-NhlApi'></a>

NhlApi type

Namespace

Nhl.Api

Summary

The official unofficial NHL API providing various NHL information about players, teams, conferences, divisions, statistics and more

<a name='M-Nhl-Api-NhlApi-GetActiveFranchisesAsync'></a>

GetActiveFranchisesAsync() method

Summary

Returns all active NHL franchises

Returns

A collection of all active NHL franchises, see Franchise for more information

Parameters

This method has no parameters.

<a name='M-Nhl-Api-NhlApi-GetActiveTeamsAsync'></a>

GetActiveTeamsAsync() method

Summary

Returns all active NHL teams

Returns

A collection of all active NHL teams, see Team for more information

Parameters

This method has no parameters.

<a name='M-Nhl-Api-NhlApi-GetAllTeamsStatisticsBySeasonAsync-System-String-'></a>

GetAllTeamsStatisticsBySeasonAsync(seasonYear) method

Summary

Returns all of the NHL team's statistics for the specific NHL season

Returns

A collection of NHL team statistics for the specified season

Parameters
Name Type Description
seasonYear System.String A season year for the all the NHL statistics, Example: 19971998, see SeasonYear for more information

<a name='M-Nhl-Api-NhlApi-GetConferenceByIdAsync-System-Int32-'></a>

GetConferenceByIdAsync(conferenceId) method

Summary

Returns all of the NHL conferences

Returns

An NHL conference, see Conference for more information

Parameters
Name Type Description
conferenceId System.Int32 The NHL conference id, Example: Eastern Conference is the number 6

<a name='M-Nhl-Api-NhlApi-GetConferenceByIdAsync-Nhl-Api-Models-Enumerations-Conference-ConferenceEnum-'></a>

GetConferenceByIdAsync(conference) method

Summary

Returns the NHL conference by the conference enumeration Example: Eastern

Returns

An NHL conference, see Conference for more information

Parameters
Name Type Description
conference Nhl.Api.Models.Enumerations.Conference.ConferenceEnum The NHL conference id, Example: 6 - Eastern Conference, see ConferenceEnum for more information on NHL conferences

<a name='M-Nhl-Api-NhlApi-GetConferencesAsync'></a>

GetConferencesAsync() method

Summary

Returns all of the NHL conferences

Returns

A collection of all the NHL conferences, see Conference for more information

Parameters

This method has no parameters.

<a name='M-Nhl-Api-NhlApi-GetDivisionByIdAsync-System-Int32-'></a>

GetDivisionByIdAsync(divisionId) method

Summary

Returns an NHL division by the division id

Returns

Returns an NHL division, see Division for more information

Parameters
Name Type Description
divisionId System.Int32 The NHL division id, Example: Atlantic division is the number 17

<a name='M-Nhl-Api-NhlApi-GetDivisionByIdAsync-Nhl-Api-Models-Enumerations-Division-DivisionEnum-'></a>

GetDivisionByIdAsync(division) method

Summary

Returns an NHL division by the division enumeration Example: Atlantic

Returns

Returns an NHL division, see Division for more information

Parameters
Name Type Description
division Nhl.Api.Models.Enumerations.Division.DivisionEnum The NHL division id, Example: 17 - Atlantic division, see DivisionEnum for more information on NHL divisions

<a name='M-Nhl-Api-NhlApi-GetDivisionsAsync'></a>

GetDivisionsAsync() method

Summary

Returns all of the NHL divisions

Returns

A collection of all the NHL divisions, see Division for more information

Parameters

This method has no parameters.

<a name='M-Nhl-Api-NhlApi-GetDraftByYear-System-String-'></a>

GetDraftByYear(year) method

Summary

Returns the NHL league draft based on a specific year based on the 4 character draft year, see DraftYear for more information. Some responses provide very large JSON payloads

Returns

The NHL league draft, which includes draft rounds, player information and more, see LeagueDraft for more information

Parameters
Name Type Description
year System.String The specified year of the NHL draft, see DraftYear for all NHL draft years

<a name='M-Nhl-Api-NhlApi-GetEventTypesAsync'></a>

GetEventTypesAsync() method

Summary

Return's all the event types within the NHL

Returns

A collection of event types within the NHL, see EventType for more information

Parameters

This method has no parameters.

<a name='M-Nhl-Api-NhlApi-GetFranchiseByIdAsync-System-Int32-'></a>

GetFranchiseByIdAsync(franchiseId) method

Summary

Returns an NHL franchise by the franchise id

Returns

An NHL franchise, see Franchise for more information

Parameters
Name Type Description
franchiseId System.Int32 The NHL franchise id, Example: MontrΓ©al Canadiens - 1

<a name='M-Nhl-Api-NhlApi-GetFranchiseByIdAsync-Nhl-Api-Models-Enumerations-Franchise-FranchiseEnum-'></a>

GetFranchiseByIdAsync(franchise) method

Summary

Returns an NHL franchise by the franchise id Example: LosAngelesKings

Returns

An NHL franchise, see Franchise for more information

Parameters
Name Type Description
franchise Nhl.Api.Models.Enumerations.Franchise.FranchiseEnum The NHL team id, Example: 10 - Toronto Maple Leafs, see FranchiseEnum for more information on NHL franchises

<a name='M-Nhl-Api-NhlApi-GetFranchisesAsync'></a>

GetFranchisesAsync() method

Summary

Returns all NHL franchises, including information such as team name, location and more

Returns

A collection of all NHL franchises, see Franchise for more information

Parameters

This method has no parameters.

<a name='M-Nhl-Api-NhlApi-GetGameScheduleAsync'></a>

GetGameScheduleAsync() method

Summary

Return's today's the NHL game schedule and it will provide today's current NHL game schedule

Returns

NHL game schedule, see GameSchedule for more information

Parameters

This method has no parameters.

<a name='M-Nhl-Api-NhlApi-GetGameScheduleByDateAsync-System-Nullable{System-DateTime}-'></a>

GetGameScheduleByDateAsync(date) method

Summary

Return's the NHL game schedule based on the provided DateTime. If the date is null, it will provide today's current NHL game schedule

Returns

NHL game schedule, see GameSchedule for more information

Parameters
Name Type Description
date System.Nullable{System.DateTime} The requested date for the NHL game schedule

<a name='M-Nhl-Api-NhlApi-GetGameScheduleByDateAsync-System-Int32,System-Int32,System-Int32-'></a>

GetGameScheduleByDateAsync(year,month,day) method

Summary

Return's the NHL game schedule based on the provided year, month and day

Returns

NHL game schedule, see GameSchedule for more information

Parameters
Name Type Description
year System.Int32 The requested year for the NHL game schedule
month System.Int32 The requested month for the NHL game schedule
day System.Int32 The requested day for the NHL game schedule

<a name='M-Nhl-Api-NhlApi-GetGameScheduleForTeamByDateAsync-Nhl-Api-Models-Enumerations-Team-TeamEnum,System-DateTime,System-DateTime-'></a>

GetGameScheduleForTeamByDateAsync(team,startDate,endDate) method

Summary

Return's the NHL game schedule for the specified team based on the provided start date and end date

Returns

Returns all of the NHL team's game schedules based on the selected start and end dates

Parameters
Name Type Description
team Nhl.Api.Models.Enumerations.Team.TeamEnum The NHL team id, Example: AnaheimDucks
startDate System.DateTime The starting date for the NHL team game schedule, see LeagueSeasonDates for start dates of NHL seasons, Example: 2017-01-01
endDate System.DateTime The ending date for the NHL team game schedule, see LeagueSeasonDates for start dates of NHL seasons, Example: 1988-06-01

<a name='M-Nhl-Api-NhlApi-GetGameScheduleForTeamByDateAsync-System-Int32,System-DateTime,System-DateTime-'></a>

GetGameScheduleForTeamByDateAsync(teamId,startDate,endDate) method

Summary

Return's the NHL game schedule for the specified team based on the provided start date and end date

Returns

Returns all of the NHL team's game schedules based on the selected start and end dates

Parameters
Name Type Description
teamId System.Int32 The NHL team id, Example: 1
startDate System.DateTime The starting date for the NHL team game schedule, see LeagueSeasonDates for start dates of NHL seasons, Example: 2017-01-01
endDate System.DateTime The ending date for the NHL team game schedule, see LeagueSeasonDates for start dates of NHL seasons, Example: 1988-06-01

<a name='M-Nhl-Api-NhlApi-GetGameStatusesAsync'></a>

GetGameStatusesAsync() method

Summary

Returns all of the valid NHL game statuses of an NHL game

Returns

A collection of NHL game statues, see GameStatus for more information

Parameters

This method has no parameters.

<a name='M-Nhl-Api-NhlApi-GetGameTypesAsync'></a>

GetGameTypesAsync() method

Summary

Returns all of the NHL game types within a season and within special events

Returns

A collection of NHL and other sporting event game types, see GameType for more information

Parameters

This method has no parameters.

<a name='M-Nhl-Api-NhlApi-GetGoalieStatisticsBySeasonAsync-System-Int32,System-String-'></a>

GetGoalieStatisticsBySeasonAsync(playerId,seasonYear) method

Summary

Returns all of the NHL goalie statistics for a specific statistic type and NHL season with insightful statistics and NHL game data

Returns

A collection of all the in-depth NHL goalie statistics per season

Parameters
Name Type Description
playerId System.Int32 The identifier for the NHL goalie
seasonYear System.String The argument for the NHL season of the play, see SeasonYear for more information

<a name='M-Nhl-Api-NhlApi-GetGoalieStatisticsBySeasonAsync-Nhl-Api-Models-Enumerations-Player-PlayerEnum,System-String-'></a>

GetGoalieStatisticsBySeasonAsync(player,seasonYear) method

Summary

Returns all of the NHL goalie statistics for a specific statistic type and NHL season with insightful statistics and NHL game data

Returns

A collection of all the in-depth NHL goalie statistics per season

Parameters
Name Type Description
player Nhl.Api.Models.Enumerations.Player.PlayerEnum The identifier for the NHL goalie
seasonYear System.String The argument for the NHL season of the play, see SeasonYear for more information

<a name='M-Nhl-Api-NhlApi-GetInactiveFranchisesAsync'></a>

GetInactiveFranchisesAsync() method

Summary

Returns all inactive NHL franchises

Returns

A collection of all inactive NHL franchises, see Franchise for more information

Parameters

This method has no parameters.

<a name='M-Nhl-Api-NhlApi-GetInactiveTeamsAsync'></a>

GetInactiveTeamsAsync() method

Summary

Returns all inactive NHL teams

Returns

A collection of all active NHL teams, see Team for more information

Parameters

This method has no parameters.

<a name='M-Nhl-Api-NhlApi-GetLeagueAwardByIdAsync-System-Int32-'></a>

GetLeagueAwardByIdAsync(awardId) method

Summary

Returns an NHL award by id

Returns

An NHL award, see Award for more information

Parameters
Name Type Description
awardId System.Int32 The identifier for the NHL award, Example: Ted Lindsay Award - 13

<a name='M-Nhl-Api-NhlApi-GetLeagueAwardByIdAsync-Nhl-Api-Models-Enumerations-Award-AwardEnum-'></a>

GetLeagueAwardByIdAsync(leagueAward) method

Summary

Returns an NHL award by the award id Example: StanleyCup

Returns

An NHL award, see Award for more information

Parameters
Name Type Description
leagueAward Nhl.Api.Models.Enumerations.Award.AwardEnum The NHL league award identifier, see AwardEnum for more information on NHL awards

<a name='M-Nhl-Api-NhlApi-GetLeagueAwardsAsync'></a>

GetLeagueAwardsAsync() method

Summary

Returns all of the NHL awards, including the description, history, and images

Returns

A collection of all the NHL awards, see Award for more information

Parameters

This method has no parameters.

<a name='M-Nhl-Api-NhlApi-GetLeagueProspectByIdAsync-System-Int32-'></a>

GetLeagueProspectByIdAsync(prospectId) method

Summary

Returns an NHL prospect profile by their prospect id

Returns

An NHL prospect, see ProspectProfile for more information

Parameters
Name Type Description
prospectId System.Int32 The NHL prospect id, Example: 86515 - Francesco Pinelli

<a name='M-Nhl-Api-NhlApi-GetLeagueProspectsAsync'></a>

GetLeagueProspectsAsync() method

Summary

Returns all the NHL league prospects The NHL prospects response provides a very large JSON payload

Returns

A collection of all the NHL prospects, see ProspectProfile for more information

Parameters

This method has no parameters.

<a name='M-Nhl-Api-NhlApi-GetLeagueStandingTypesAsync'></a>

GetLeagueStandingTypesAsync() method

Summary

Returns all of the NHL league standing types, this includes playoff and preseason standings

Returns

A collection of all the NHL standing types, see LeagueStandingType for more information

Parameters

This method has no parameters.

<a name='M-Nhl-Api-NhlApi-GetLeagueStandingsAsync-System-Nullable{System-DateTime}-'></a>

GetLeagueStandingsAsync(date) method

Summary

Returns the standings of every team in the NHL for the provided date, if the date is null it will provide the current NHL league standings

Returns

A collection of all the league standings

Parameters
Name Type Description
date System.Nullable{System.DateTime} The NHL league standings date for the request NHL standings

<a name='M-Nhl-Api-NhlApi-GetLeagueStandingsAsync'></a>

GetLeagueStandingsAsync() method

Summary

Returns the standings of every team in the NHL for the current date

Returns

A collection of all the league standings

Parameters

This method has no parameters.

<a name='M-Nhl-Api-NhlApi-GetLeagueStandingsByConferenceAsync'></a>

GetLeagueStandingsByConferenceAsync() method

Summary

Returns the standings of every team in the NHL by conference for the current date

Returns

A collection of all the league standings by conference

Parameters

This method has no parameters.

<a name='M-Nhl-Api-NhlApi-GetLeagueStandingsByConferenceAsync-System-Nullable{System-DateTime}-'></a>

GetLeagueStandingsByConferenceAsync(date) method

Summary

Returns the standings of every team in the NHL by conference for the current date, if the date is null it will provide the current NHL league standings by conference

Returns

A collection of all the league standings by conference for the selected date

Parameters
Name Type Description
date System.Nullable{System.DateTime} The NHL league standings date for the request NHL standings by conference

<a name='M-Nhl-Api-NhlApi-GetLeagueStandingsByDivisionAsync'></a>

GetLeagueStandingsByDivisionAsync() method

Summary

Returns the standings of every team by division in the NHL for the current date

Returns

A collection of all the league standings by division

Parameters

This method has no parameters.

<a name='M-Nhl-Api-NhlApi-GetLeagueStandingsByDivisionAsync-System-Nullable{System-DateTime}-'></a>

GetLeagueStandingsByDivisionAsync(date) method

Summary

Returns the standings of every team by division in the NHL by date, if the date is null it will provide the current NHL league standings by division

Returns

A collection of all the league standings by division for the selected date

Parameters
Name Type Description
date System.Nullable{System.DateTime} The NHL league standings date for the request NHL standings by division

<a name='M-Nhl-Api-NhlApi-GetLeagueTeamRosterMembersAsync'></a>

GetLeagueTeamRosterMembersAsync() method

Summary

Returns all of the active NHL players

Returns

A collection of all NHL players

Parameters

This method has no parameters.

<a name='M-Nhl-Api-NhlApi-GetLeagueTeamRosterMembersBySeasonYearAsync-System-String-'></a>

GetLeagueTeamRosterMembersBySeasonYearAsync(seasonYear) method

Summary

Returns all of the active NHL roster members by a season year

Returns

A collection of all NHL players based on the season year provided

Parameters
Name Type Description
seasonYear System.String A season year for the entire NHL roster, Example: 19971998, see SeasonYear for more information

<a name='M-Nhl-Api-NhlApi-GetLeagueVenueByIdAsync-System-Int32-'></a>

GetLeagueVenueByIdAsync(venueId) method

Summary

Returns an NHL venue by the venue id Example: 5058 - Canada Life Centre

Returns

An NHL venue, see LeagueVenue for more information

Parameters
Name Type Description
venueId System.Int32 The specified id of an NHL venue,

<a name='M-Nhl-Api-NhlApi-GetLeagueVenueByIdAsync-Nhl-Api-Models-Enumerations-Venue-VenueEnum-'></a>

GetLeagueVenueByIdAsync(venue) method

Summary

Returns an NHL venue by the venue enumeration Example: EnterpriseCenter

Returns

An NHL venue, see LeagueVenue for more information

Parameters
Name Type Description
venue Nhl.Api.Models.Enumerations.Venue.VenueEnum The specified NHL venue, see VenueEnum for more information on NHL venues

<a name='M-Nhl-Api-NhlApi-GetLeagueVenuesAsync'></a>

GetLeagueVenuesAsync() method

Summary

Returns all of the NHL venue's, including arenas and stadiums This is not a comprehensive list of all NHL stadiums and arenas

Returns

A collection of NHL stadiums and arenas, see LeagueVenue for more information

Parameters

This method has no parameters.

<a name='M-Nhl-Api-NhlApi-GetLiveGameFeedById-System-Int32-'></a>

GetLiveGameFeedById(liveGameFeedId) method

Summary

Returns the live game feed content for an NHL game

Returns

A detailed collection of information about play by play details, scores, teams, coaches, on ice statistics, real-time updates and more

Parameters
Name Type Description
liveGameFeedId System.Int32 The live game feed id, Example: 2021020087

<a name='M-Nhl-Api-NhlApi-GetPlayTypesAsync'></a>

GetPlayTypesAsync() method

Summary

Returns a collection of all the play types within the duration of an NHL game

Returns

A collection of distinct play types, see PlayType for more information

Parameters

This method has no parameters.

<a name='M-Nhl-Api-NhlApi-GetPlayerByIdAsync-System-Int32-'></a>

GetPlayerByIdAsync(playerId) method

Summary

Returns an NHL player by their player id, includes information such as age, weight, position and more

Returns

An NHL player profile, see Player for more information

Parameters
Name Type Description
playerId System.Int32 An NHL player id, Example: 8478402 is Connor McDavid

<a name='M-Nhl-Api-NhlApi-GetPlayerByIdAsync-Nhl-Api-Models-Enumerations-Player-PlayerEnum-'></a>

GetPlayerByIdAsync(player) method

Summary

Returns an NHL player by their player id, includes information such as age, weight, position and more

Returns

An NHL player profile, see Player for more information

Parameters
Name Type Description
player Nhl.Api.Models.Enumerations.Player.PlayerEnum An NHL player id, Example: 8478402 - Connor McDavid, see PlayerEnum for more information on NHL players

<a name='M-Nhl-Api-NhlApi-GetPlayerStatisticsBySeasonAsync-System-Int32,System-String-'></a>

GetPlayerStatisticsBySeasonAsync(playerId,seasonYear) method

Summary

Returns all of the NHL player statistics for a specific statistic type and NHL season with insightful statistics and NHL game data

Returns

A collection of all the in-depth NHL player statistics by type

Parameters
Name Type Description
playerId System.Int32 The identifier for the NHL player
seasonYear System.String The argument for the NHL season of the play, see SeasonYear for more information

<a name='M-Nhl-Api-NhlApi-GetPlayerStatisticsBySeasonAsync-Nhl-Api-Models-Enumerations-Player-PlayerEnum,System-String-'></a>

GetPlayerStatisticsBySeasonAsync(player,seasonYear) method

Summary

Returns all of the NHL player statistics for a specific statistic type and NHL season with insightful statistics and NHL game data

Returns

A collection of all the in-depth NHL player statistics by type

Parameters
Name Type Description
player Nhl.Api.Models.Enumerations.Player.PlayerEnum The identifier for the NHL player
seasonYear System.String The argument for the NHL season of the play, see SeasonYear for more information

<a name='M-Nhl-Api-NhlApi-GetPlayoffTournamentTypesAsync'></a>

GetPlayoffTournamentTypesAsync() method

Summary

Returns a collection of all the different types of playoff tournaments in the NHL

Returns

A collection of tournament types, see PlayoffTournamentType for more information

Parameters

This method has no parameters.

<a name='M-Nhl-Api-NhlApi-GetSeasonByYearAsync-System-String-'></a>

GetSeasonByYearAsync(seasonYear) method

Summary

Returns the NHL season information based on the provided season years

Returns

An NHL season based on the provided season year, Example: '20172018'

Parameters
Name Type Description
seasonYear System.String See SeasonYear for all valid season year arguments

<a name='M-Nhl-Api-NhlApi-GetSeasonsAsync'></a>

GetSeasonsAsync() method

Summary

Returns all of the NHL seasons since the inception of the league in 1917-1918

Returns

A collection of seasons since the inception of the NHL

Parameters

This method has no parameters.

<a name='M-Nhl-Api-NhlApi-GetStatisticTypesAsync'></a>

GetStatisticTypesAsync() method

Summary

Returns all distinct types of NHL statistics types

Returns

A collection of all the various NHL statistics types, see StatisticTypes for more information

Parameters

This method has no parameters.

<a name='M-Nhl-Api-NhlApi-GetTeamByIdAsync-System-Int32-'></a>

GetTeamByIdAsync(teamId) method

Summary

Returns an NHL team by the team id

Returns

An NHL team with information including name, location, division and more, see Team for more information

Parameters
Name Type Description
teamId System.Int32 The NHL team id, Example: Toronto Maple Leafs - 10

<a name='M-Nhl-Api-NhlApi-GetTeamByIdAsync-Nhl-Api-Models-Enumerations-Team-TeamEnum-'></a>

GetTeamByIdAsync(team) method

Summary

Returns an NHL team by the team enumeration Example: SeattleKraken

Returns

An NHL team with information including name, location, division and more, see Team for more information on teams

Parameters
Name Type Description
team Nhl.Api.Models.Enumerations.Team.TeamEnum The NHL team id, Example: 10 - Toronto Maple Leafs, see TeamEnum for more information on NHL teams

<a name='M-Nhl-Api-NhlApi-GetTeamLogoAsync-System-Int32,Nhl-Api-Models-Team-TeamLogoType-'></a>

GetTeamLogoAsync(teamId,teamLogoType) method

Summary

Returns an the NHL team logo based a dark or light preference using the NHL team id

Returns

Returns NHL team logo information including a byte array, base64 encoded string and the uri endpoint

Parameters
Name Type Description
teamId System.Int32 The NHL team identifier - Seattle Kraken: 55
teamLogoType Nhl.Api.Models.Team.TeamLogoType The NHL team logo image type, based on the background of light or dark

<a name='M-Nhl-Api-NhlApi-GetTeamLogoAsync-Nhl-Api-Models-Enumerations-Team-TeamEnum,Nhl-Api-Models-Team-TeamLogoType-'></a>

GetTeamLogoAsync(team,teamLogoType) method

Summary

Returns an the NHL team logo based a dark or light preference using the NHL team enumeration

Returns

Returns NHL team logo information including a byte array, base64 encoded string and the uri endpoint

Parameters
Name Type Description
team Nhl.Api.Models.Enumerations.Team.TeamEnum The NHL team identifier, 55 - Seattle Kraken, see TeamEnum for more information
teamLogoType Nhl.Api.Models.Team.TeamLogoType The NHL team logo image type, based on the background of light or dark

<a name='M-Nhl-Api-NhlApi-GetTeamStatisticsByIdAsync-System-Int32,System-String-'></a>

GetTeamStatisticsByIdAsync(teamId,seasonYear) method

Summary

Returns a specified NHL team's statistics for the specified season, the most recent season statistics will be returned

Returns

A collection of all the specified NHL team statistics for the specified season

Parameters
Name Type Description
teamId System.Int32 The NHL team id, Example: Toronto Maple Leafs - 10
seasonYear System.String The NHL season year, see SeasonYear for all valid seasons, Example: 20202021

<a name='M-Nhl-Api-NhlApi-GetTeamStatisticsByIdAsync-Nhl-Api-Models-Enumerations-Team-TeamEnum,System-String-'></a>

GetTeamStatisticsByIdAsync(team,seasonYear) method

Summary

Returns a specified NHL team's statistics for the specified season, the most recent season statistics will be returned

Returns

A collection of all the specified NHL team statistics for the specified season

Parameters
Name Type Description
team Nhl.Api.Models.Enumerations.Team.TeamEnum The NHL team id, Example: AnaheimDucks
seasonYear System.String The NHL season year, see SeasonYear for all valid seasons, Example: 20202021

<a name='M-Nhl-Api-NhlApi-GetTeamStatisticsBySeasonAsync-System-Int32,System-String-'></a>

GetTeamStatisticsBySeasonAsync(teamId,seasonYear) method

Summary

Returns all of the NHL team statistics for the specific NHL team identifier and season

Returns

A collection of NHL team statistics for the specified season

Parameters
Name Type Description
teamId System.Int32 The NHL team identifier - Seattle Kraken: 55
seasonYear System.String A season year for the entire NHL roster, Example: 19971998, see SeasonYear for more information

<a name='M-Nhl-Api-NhlApi-GetTeamStatisticsBySeasonAsync-Nhl-Api-Models-Enumerations-Team-TeamEnum,System-String-'></a>

GetTeamStatisticsBySeasonAsync(team,seasonYear) method

Summary

Returns all of the NHL team statistics for the specific NHL team identifier and season

Returns

A collection of NHL team statistics for the specified season

Parameters
Name Type Description
team Nhl.Api.Models.Enumerations.Team.TeamEnum The NHL team id, Example: AnaheimDucks, see TeamEnum for more information
seasonYear System.String A season year for the entire NHL roster, Example: 19971998, see SeasonYear for more information

<a name='M-Nhl-Api-NhlApi-GetTeamsAsync'></a>

GetTeamsAsync() method

Summary

Returns all active and inactive NHL teams

Returns

A collection of all NHL teams, see Team for more information

Parameters

This method has no parameters.

<a name='M-Nhl-Api-NhlApi-GetTeamsByIdsAsync-System-Collections-Generic-IEnumerable{System-Int32}-'></a>

GetTeamsByIdsAsync(teamIds) method

Summary

Returns a collection of NHL team by the team id's

Returns

A collection of NHL team's with information including name, location, division and more, see Team for more information

Parameters
Name Type Description
teamIds System.Collections.Generic.IEnumerable{System.Int32} A collection of NHL team id's, Example: 10 - Toronto Maple Leafs

<a name='M-Nhl-Api-NhlApi-GetTeamsByIdsAsync-System-Collections-Generic-IEnumerable{Nhl-Api-Models-Enumerations-Team-TeamEnum}-'></a>

GetTeamsByIdsAsync(teams) method

Summary

Returns a collection of NHL team's by the team enumeration values

Returns

A collection of NHL team's with information including name, location, division and more, see Team for more information

Parameters
Name Type Description
teams System.Collections.Generic.IEnumerable{Nhl.Api.Models.Enumerations.Team.TeamEnum} A collection of NHL team id's, Example: 10 - Toronto Maple Leafs, see TeamEnum for more information on NHL teams

<a name='M-Nhl-Api-NhlApi-GetTournamentTypesAsync'></a>

GetTournamentTypesAsync() method

Summary

Returns a collection of all the different types of tournaments in the hockey

Returns

A collection of tournament types, see TournamentType for more information

Parameters

This method has no parameters.

<a name='M-Nhl-Api-NhlApi-SearchAllPlayersAsync-System-String-'></a>

SearchAllPlayersAsync(query) method

Summary

Returns any active or inactive NHL players based on the search query provided

Returns

A collection of all NHL players based on the search query provided

Parameters
Name Type Description
query System.String A search term to find NHL players, Example: "Jack Adams" or "Wayne Gretzky" or "Mats Sundin"

<a name='M-Nhl-Api-NhlApi-SearchLeagueTeamRosterMembersAsync-System-String-'></a>

SearchLeagueTeamRosterMembersAsync(query) method

Summary

Returns all of the active rostered NHL players based on the search query provided+

Returns

A collection of all rostered and active NHL players based on the search query provided

Parameters
Name Type Description
query System.String An search term to find NHL players, Example: "Auston Matthews" or "Carey Pr.." or "John C"

Bugs πŸ›

If you have any issues with the library or suggestions, please feel free to create an issue and it will be adressed as soon as possible πŸ˜ƒ

Feature Backlog πŸ“ˆ

Here are some of the future items I would like to add and are currently in the backlog:

  • Player Search within the NHL league
  • Add additional API functionality for ease of searching for various NHL entities
  • Add NHL player enum dynamically generated by T4 runtime templates
  • Live Game Feed for Live Games
  • Content and Media for Games

Notable Mentions πŸ™

Thank you to all the people in the hockey community, especially <a href="https://gitlab.com/dword4" target="_blank">Drew Hynes</a> to contributed to documenting the <a href="https://statsapi.web.nhl.com/api/v1" target="_blank">NHL Stats API</a>. Without all of their help, guidance and knowledge none of this would be possible.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Nhl.Api:

Package Downloads
Nhl.Api.Extensions.Microsoft.DependencyInjection

The Microsoft .NET dependency injection library extension for the official unofficial .NET NHL API

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.4.1 143 3/28/2024
3.4.0 120 3/8/2024
3.3.0 222 2/24/2024
3.2.2 126 1/30/2024
3.2.1 89 1/30/2024
3.2.0 107 1/24/2024
3.1.0 166 1/5/2024
3.0.0 170 12/31/2023
2.2.1 2,289 10/9/2023
2.2.0 5,130 9/1/2023
2.1.0 13,363 10/18/2022
2.0.0 1,756 7/28/2022
1.9.2 676 3/17/2022
1.9.1 670 2/20/2022
1.9.0 694 1/28/2022
1.8.0 354 12/30/2021
1.7.0 373 12/21/2021
1.6.1 426 12/12/2021
1.6.0 587 12/11/2021
1.5.1 1,983 11/26/2021
1.5.0 1,883 11/26/2021
1.4.0 1,213 11/15/2021
1.3.0 483 10/28/2021
1.2.0 301 10/14/2021
1.1.3 324 10/8/2021
1.1.2 322 10/8/2021
1.1.1 305 10/8/2021
1.1.0 324 10/8/2021
1.0.2 309 9/30/2021
1.0.1 344 9/30/2021
1.0.0 393 9/30/2021