NHL.NET 1.0.0

dotnet add package NHL.NET --version 1.0.0                
NuGet\Install-Package NHL.NET -Version 1.0.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.NET" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NHL.NET --version 1.0.0                
#r "nuget: NHL.NET, 1.0.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.NET as a Cake Addin
#addin nuget:?package=NHL.NET&version=1.0.0

// Install NHL.NET as a Cake Tool
#tool nuget:?package=NHL.NET&version=1.0.0                

Code Analysis Build and Test

NHL.NET

C# API wrapper for the undocumented NHL API

This project would not be possible without the documentation provided from dword4 nhlapi

Usage

It is highly recommended you don't manually create an instance of NHLClient for every request.

Using dependency injection

services.AddSingleton<INHLClient, NHLClient>();

Docs

Teams

GetAllAsync / GetAll

Gets a list of currenty active NHL teams.

NHLTeamList teamList = await nhlClient.Teams.GetAllAsync();
NHLTeamList teamList = nhlClient.Teams.GetAll();

GetMultipleAsync / GetMultiple

Gets a list of specific teams by id.

var teamIds = new List<int> { 1, 2, 3 };
NHLTeamList teamList = await nhlClient.Teams.GetMultipleAsync(teamIds);
NHLTeamList teamList = nhlClient.Teams.GetMultiple(teamIds);

GetByIdAsync / GetById

Get a specific team by id.

NHLTeam team = await nhlClient.Teams.GetByIdAsync(5);
NHLTeam team = nhlClient.Teams.GetById(5);

GetStatsAsync / GetStats

Gets a teams stats for a given team and specific season (current season if no season is passed).

NHLTeamStats currentSeasonTeamStats = await nhlClient.Teams.GetStatsAsync(5);
currentSeasonTeamStats = nhlClient.Teams.GetStats(5);

NHLTeamStats specificSeasonTeamStats = await nhlClient.Teams.GetStatsAsync(5, "20102011");
specificSeasonTeamStats = nhlclient.Teams.GetStats(5, "20102011");

// Ex. 52.4
var faceOffWinPercentage = specificSeasonTeamStats.FaceoffWinPercentage;
// Ex. "14th"
var powerplayRank = currentSeasonTeamStats.PowerPlayRank;

For all team stats properties see: Team Stats

Divisions

GetAllAsync / GetAll

Gets a list of currently active NHL divisions.

NHLDivisionList divisionList = await nhlClient.Divisions.GetAllAsync();
NHLDivisionList divisionList = nhlClient.Divisions.GetAll();

GetMultipleAsync / GetMultiple

Gets a list of specific divisions by id.

var divisionIds = new List<int> { 1, 2, 3 };
NHLDivisionList divisionList = await nhlClient.Divisions.GetMultipleAsync(divisionIds);
NHLDivisionList divisionList = nhlClient.Divisions.GetMultiple(divisionIds);

Conferences

GetAllAsync / GetAll

Gets a list of currently active NHL conferences.

NHLConferenceList conferenceList = await nhlClient.Conferences.GetAllAsync();
NHLConferenceList conferenceList = nhlClient.Conferences.GetAll();

GetMultipleAsync / GetMultiple

Gets a list of specific conferences by id.

var conferenceIds = new List<int> { 1, 2, 3 };
NHLConferenceList conferenceList = await nhlClient.Conferences.GetMultipleAsync();
NHLConferenceList conferenceList = nhlClient.Conferences.GetMultiple();

GetByIdAsync / GetById

Gets a specific conference by id.

NHLConference conference = await nhlClient.Conferences.GetByIdAsync(1);
NHLConference conference = nhlClient.Conferences.GetById(1);

Players

GetByIdAsync / GetById

Get a specific player by id.

// Fetches information about Jeff Carter.
// Async
NHLPlayer player = await nhlClient.Players.GetByIdAsync(8470604);
// Sync
NHLPlayer player = await nhlClient.Players.GetById(8470604);

GetStatsBySeasonAsync / GetStatsBySeason

Get a players stats by season.

// Fetches a players regular season stats for the 2016-2017 season.
NHLPlayerStatsList playerStats = await nhlClient.Players.GetStatsBySeasonAsync(8470604, "20162017");
NHLPlayerStatsList playerStats = nhlClient.Players.GetStatsBySeason(8470604, "20162017");

// Fetches a players playoff stats for a season.
NHLPlayerStatsList playerStats = await nhlClient.Players.GetStatsBySeasonAsync(8470604, "20162017", StatsTypes.SingleSeasonPlayoffs);
NHLPlayerStatsList playerStats = nhlClient.Players.GetStatsBySeason(8470604, "20162017", StatsTypes.SingleSeasonPlayoffs);
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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 249 3/10/2022