Skip to content

Commit 4ad27d0

Browse files
authored
Merge pull request #61 from Afischbacher/develop
v3.6.0
2 parents d721f97 + 082c1c9 commit 4ad27d0

32 files changed

+842
-193
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using System;
2+
3+
namespace Nhl.Api.Common.Attributes;
4+
5+
/// <summary>
6+
/// An enumeration to specifically mark NHL teams active or inactive
7+
/// </summary>
8+
/// <remarks>
9+
/// The constructor
10+
/// </remarks>
11+
/// <param name="isActive">Whether an NHL team is active in the leauge</param>
12+
[AttributeUsage(AttributeTargets.Field, Inherited = false, AllowMultiple = false)]
13+
public class TeamActiveAttribute(bool isActive) : Attribute
14+
{
15+
/// <summary>
16+
/// Determines if the NHL team is currently active
17+
/// </summary>
18+
public bool IsActive { get; } = isActive;
19+
}

Nhl.Api.Common/Extensions/EnumExtensions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Linq;
33
using System.Reflection;
44
using System.Runtime.Serialization;

Nhl.Api.Common/Http/NhlApiHttpClient.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public abstract class NhlApiHttpClient : INhlApiHttpClient
5959
/// <summary>
6060
/// The Nhl.Api HTTP Client
6161
/// </summary>
62-
public NhlApiHttpClient(string clientApiUri, string clientVersion, int timeoutInSeconds = 30)
62+
public NhlApiHttpClient(string clientApiUri, string clientVersion, int timeoutInSeconds = 60)
6363
{
6464
ServicePointManager.ReusePort = true;
6565
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls13 | SecurityProtocolType.Tls12;

Nhl.Api.Common/Http/NhlApiWebHttpClient.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class NhlApiWebHttpClient : NhlApiHttpClient
2020
/// <summary>
2121
/// The dedicated NHL web api HTTP Client for the Nhl.Api
2222
/// </summary>
23-
public NhlApiWebHttpClient() : base(clientApiUri: ClientApiUrl, clientVersion: "v1", timeoutInSeconds: 30)
23+
public NhlApiWebHttpClient() : base(clientApiUri: ClientApiUrl, clientVersion: "v1", timeoutInSeconds: 60)
2424
{
2525

2626
}

Nhl.Api.Common/Http/NhlCmsHttpClient.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Net.Http;
33

44
namespace Nhl.Api.Common.Http;
@@ -18,7 +18,7 @@ public class NhlCmsHttpClient : NhlApiHttpClient
1818
/// <summary>
1919
/// The dedicated NHL HTTP client for NHL player images and content
2020
/// </summary>
21-
public NhlCmsHttpClient() : base(clientApiUri: ClientApiUrl, clientVersion: string.Empty, timeoutInSeconds: 30)
21+
public NhlCmsHttpClient() : base(clientApiUri: ClientApiUrl, clientVersion: string.Empty, timeoutInSeconds: 60)
2222
{
2323
}
2424

Nhl.Api.Common/Http/NhlEApiHttpClient.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Net.Http;
33

44
namespace Nhl.Api.Common.Http;
@@ -19,7 +19,7 @@ public class NhlEApiHttpClient : NhlApiHttpClient
1919
/// <summary>
2020
/// The dedicated NHLe Api web api HTTP Client for the Nhl.Api
2121
/// </summary>
22-
public NhlEApiHttpClient() : base(clientApiUri: ClientApiUrl, clientVersion: string.Empty, timeoutInSeconds: 30)
22+
public NhlEApiHttpClient() : base(clientApiUri: ClientApiUrl, clientVersion: string.Empty, timeoutInSeconds: 60)
2323
{
2424

2525
}

Nhl.Api.Common/Http/NhlShiftChartHttpClient.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class NhlShiftChartHttpClient : NhlApiHttpClient
1818
/// <summary>
1919
/// The dedicated NHL HTTP client for the shift charts for individual live game feeds
2020
/// </summary>
21-
public NhlShiftChartHttpClient() : base(clientApiUri: ClientApiUrl, clientVersion: string.Empty, timeoutInSeconds: 30)
21+
public NhlShiftChartHttpClient() : base(clientApiUri: ClientApiUrl, clientVersion: string.Empty, timeoutInSeconds: 60)
2222
{
2323
}
2424

Nhl.Api.Common/Http/NhlStaticAssetsApiHttpClient.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class NhlStaticAssetsApiHttpClient : NhlApiHttpClient
1717
/// <summary>
1818
/// The dedicated NHL static assets HTTP Client for the Nhl.Api
1919
/// </summary>
20-
public NhlStaticAssetsApiHttpClient() : base(clientApiUri: ClientApiUrl, clientVersion: string.Empty, timeoutInSeconds: 30)
20+
public NhlStaticAssetsApiHttpClient() : base(clientApiUri: ClientApiUrl, clientVersion: string.Empty, timeoutInSeconds: 60)
2121
{
2222
}
2323

Nhl.Api.Common/Http/NhlSuggestionApiHttpClient.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Net.Http;
33

44
namespace Nhl.Api.Common.Http;
@@ -18,7 +18,7 @@ public class NhlSuggestionApiHttpClient : NhlApiHttpClient
1818
/// <summary>
1919
/// The dedicated NHL HTTP Client for the NHL suggestion API
2020
/// </summary>
21-
public NhlSuggestionApiHttpClient() : base(clientApiUri: ClientApiUrl, clientVersion: "v1", timeoutInSeconds: 30)
21+
public NhlSuggestionApiHttpClient() : base(clientApiUri: ClientApiUrl, clientVersion: "v1", timeoutInSeconds: 60)
2222
{
2323
}
2424

Nhl.Api.Common/Nhl.Api.Common.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<Version>3.5.0</Version>
4+
<Version>3.6.0</Version>
55
<TargetFrameworks>net8.0</TargetFrameworks>
66
<GenerateDocumentationFile>true</GenerateDocumentationFile>
77
<Nullable>enable</Nullable>

Nhl.Api.Domain/Enumerations/Team/TeamEnum.cs

+35
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using Nhl.Api.Common.Attributes;
2+
13
namespace Nhl.Api.Models.Enumerations.Team;
24

35
/// <summary>
@@ -8,133 +10,166 @@ public enum TeamEnum
810
/// <summary>
911
/// New Jersey Devils
1012
/// </summary>
13+
[TeamActive(true)]
1114
NewJerseyDevils = 1,
1215
/// <summary>
1316
/// New York Islanders
1417
/// </summary>
18+
[TeamActive(true)]
1519
NewYorkIslanders = 2,
1620
/// <summary>
1721
/// New York Rangers
1822
/// </summary>
23+
[TeamActive(true)]
1924
NewYorkRangers = 3,
2025
/// <summary>
2126
/// Philadelphia Flyers
2227
/// </summary>
28+
[TeamActive(true)]
2329
PhiladelphiaFlyers = 4,
2430
/// <summary>
2531
/// Pittsburgh Penguins
2632
/// </summary>
33+
[TeamActive(true)]
2734
PittsburghPenguins = 5,
2835
/// <summary>
2936
/// Boston Bruins
3037
/// </summary>
38+
[TeamActive(true)]
3139
BostonBruins = 6,
3240
/// <summary>
3341
/// Buffalo Sabres
3442
/// </summary>
43+
[TeamActive(true)]
3544
BuffaloSabres = 7,
3645
/// <summary>
3746
/// Montreal Canadiens
3847
/// </summary>
48+
[TeamActive(true)]
3949
MontrealCanadiens = 8,
4050
/// <summary>
4151
/// Ottawa Senators
4252
/// </summary>
53+
[TeamActive(true)]
4354
OttawaSenators = 9,
4455
/// <summary>
4556
/// Toronto Maple Leafs
4657
/// </summary>
58+
[TeamActive(true)]
4759
TorontoMapleLeafs = 10,
4860
/// <summary>
4961
/// Carolina Hurricanes
5062
/// </summary>
63+
[TeamActive(true)]
5164
CarolinaHurricanes = 12,
5265
/// <summary>
5366
/// Florida Panthers
5467
/// </summary>
68+
[TeamActive(true)]
5569
FloridaPanthers = 13,
5670
/// <summary>
5771
/// Tampa Bay Lightning
5872
/// </summary>
73+
[TeamActive(true)]
5974
TampaBayLightning = 14,
6075
/// <summary>
6176
/// Washington Capitals
6277
/// </summary>
78+
[TeamActive(true)]
6379
WashingtonCapitals = 15,
6480
/// <summary>
6581
/// Chicago Blackhawks
6682
/// </summary>
83+
[TeamActive(true)]
6784
ChicagoBlackhawks = 16,
6885
/// <summary>
6986
/// Detroit Red Wings
7087
/// </summary>
88+
[TeamActive(true)]
7189
DetroitRedWings = 17,
7290
/// <summary>
7391
/// Nashville Predators
7492
/// </summary>
93+
[TeamActive(true)]
7594
NashvillePredators = 18,
7695
/// <summary>
7796
/// St.Louis Blues
7897
/// </summary>
98+
[TeamActive(true)]
7999
StLouisBlues = 19,
80100
/// <summary>
81101
/// Calgary Flames
82102
/// </summary>
103+
[TeamActive(true)]
83104
CalgaryFlames = 20,
84105
/// <summary>
85106
/// Colorado Avalanche
86107
/// </summary>
108+
[TeamActive(true)]
87109
ColoradoAvalanche = 21,
88110
/// <summary>
89111
/// Edmonton Oilers
90112
/// </summary>
113+
[TeamActive(true)]
91114
EdmontonOilers = 22,
92115
/// <summary>
93116
/// Vancouver Canucks
94117
/// </summary>
118+
[TeamActive(true)]
95119
VancouverCanucks = 23,
96120
/// <summary>
97121
/// Anaheim Ducks
98122
/// </summary>
123+
[TeamActive(true)]
99124
AnaheimDucks = 24,
100125
/// <summary>
101126
/// Dallas Stars
102127
/// </summary>
128+
[TeamActive(true)]
103129
DallasStars = 25,
104130
/// <summary>
105131
/// Los Angeles Kings
106132
/// </summary>
133+
[TeamActive(true)]
107134
LosAngelesKings = 26,
108135
/// <summary>
109136
/// San Jose Sharks
110137
/// </summary>
138+
[TeamActive(true)]
111139
SanJoseSharks = 28,
112140
/// <summary>
113141
/// Columbus Blue Jackets
114142
/// </summary>
143+
[TeamActive(true)]
115144
ColumbusBlueJackets = 29,
116145
/// <summary>
117146
/// Minnesota Wild
118147
/// </summary>
148+
[TeamActive(true)]
119149
MinnesotaWild = 30,
120150
/// <summary>
121151
/// Winnipeg Jets
122152
/// </summary>
153+
[TeamActive(true)]
123154
WinnipegJets = 52,
124155
/// <summary>
125156
/// Arizona Coyotes
126157
/// </summary>
158+
[TeamActive(false)]
127159
ArizonaCoyotes = 53,
128160
/// <summary>
129161
/// Vegas Golden Knights
130162
/// </summary>
163+
[TeamActive(true)]
131164
VegasGoldenKnights = 54,
132165
/// <summary>
133166
/// Seattle Kraken
134167
/// </summary>
168+
[TeamActive(true)]
135169
SeattleKraken = 55,
136170
/// <summary>
137171
/// Utah Hockey Club
138172
/// </summary>
173+
[TeamActive(true)]
139174
UtahHockeyClub = 59
140175
}

Nhl.Api.Domain/Models/Draft/DraftYear.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-

1+
22
namespace Nhl.Api.Models.Draft;
33

44
/// <summary>
55
/// All of the valid NHL draft years
66
/// </summary>
7-
public class DraftYear
7+
public sealed class DraftYear
88
{
99
/// <summary>
1010
/// NHL Draft Year 1963

0 commit comments

Comments
 (0)