Releases: Afischbacher/Nhl.Api
v3.6.1
v3.6.0
Release Notes for Version 3.6.0
Highlights
-
Timeout Extension: Increased the timeout duration from 30 to 60 seconds for all HTTP client constructors to improve reliability during long-running requests.
-
Game Center Enhancements:
- Estimated Event Times: Added the ability to include estimated event date and time in game center play-by-play data.
- Box Score Retrieval: Introduced the
GetBoxscoreByGameIdAsync
method to retrieve box score information.
-
Draft Rankings Support:
- New Draft Classes: Added
PlayerDraftRanking
,PlayerDraftYear
, andPlayerDraftCategory
classes to represent draft-related data. - Draft Ranking Retrieval: Introduced the method
GetPlayerDraftRankingByYearAsync
to retrieve draft rankings by year.
- New Draft Classes: Added
-
Team Enumeration Updates:
- Active Status Annotation: Added
TeamActive
attribute to team enumerations to indicate active/inactive status. - TeamActiveAttribute Class: Introduced
TeamActiveAttribute
for better handling of team status.
- Active Status Annotation: Added
-
Statistics API Improvements:
- Game Type Filtering: Updated statistics methods to include the
gameType
parameter, allowing for more specific data retrieval.
- Game Type Filtering: Updated statistics methods to include the
-
Refactoring and Code Quality:
- Sealed Classes: Changed several classes to sealed and added static properties for better performance and code clarity.
- Switch Expressions: Refactored methods in
NhlTeamService
to use switch expressions.
-
Documentation Updates:
- README Enhancements: Updated documentation to reflect new methods and parameters.
- API Usage Clarity: Improved explanations and usage examples.
Detailed Changes
Timeout Extension
Increased the default timeoutInSeconds
parameter from 30 to 60 seconds in all HTTP client constructors to handle longer HTTP requests without timing out.
File Path | Change Summary |
---|---|
Nhl.Api.Common/Http/NhlApiHttpClient.cs | Constructor updated: timeoutInSeconds changed from 30 to 60. |
Nhl.Api.Common/Http/NhlApiWebHttpClient.cs | Constructor updated: timeoutInSeconds changed from 30 to 60. |
Nhl.Api.Common/Http/NhlCmsHttpClient.cs | Constructor updated: timeoutInSeconds changed from 30 to 60. |
Nhl.Api.Common/Http/NhlEApiHttpClient.cs | Constructor updated: timeoutInSeconds changed from 30 to 60. |
Nhl.Api.Common/Http/NhlShiftChartHttpClient.cs | Constructor updated: timeoutInSeconds changed from 30 to 60. |
Nhl.Api.Common/Http/NhlStaticAssetsApiHttpClient.cs | Constructor updated: timeoutInSeconds changed from 30 to 60. |
Nhl.Api.Common/Http/NhlSuggestionApiHttpClient.cs | Constructor updated: timeoutInSeconds changed from 30 to 60. |
Game Center Enhancements
-
GameCenterPlayByPlay.cs
- Changed
Period
property to a computed property. - Added new nullable property
EstimatedDateTimeOfPlay
.
- Changed
-
NhlGameService.cs
- Added method
AddEstimatedDateTimeOfPlayForEachPlay
to calculate estimated play times based on game data.
- Added method
-
NhlGameApi.cs
- Updated
GetGameCenterPlayByPlayByGameIdAsync
to includeincludeEventDateTime
parameter. - Added
GetBoxscoreByGameIdAsync
method for box score retrieval.
- Updated
File Path | Change Summary |
---|---|
Nhl.Api.Domain/Models/Game/GameCenterPlayByPlay.cs | Property Period changed to computed; added EstimatedDateTimeOfPlay . |
Nhl.Api.Domain/Services/NhlGameService.cs | Added AddEstimatedDateTimeOfPlayForEachPlay method for estimated play time calculation. |
Nhl.Api/Src/GameApi/NhlGameApi.cs | Updated GetGameCenterPlayByPlayByGameIdAsync ; added GetBoxscoreByGameIdAsync method. |
Draft Rankings Support
-
New Classes Added:
PlayerDraftRanking.cs
PlayerDraftYear.cs
PlayerDraftCategory.cs
-
API Updates:
- Added
GetPlayerDraftRankingByYearAsync
method inNhlApi.cs
,INhlPlayerApi.cs
, andNhlPlayerApi.cs
to fetch player draft rankings for a specific year.
- Added
File Path | Change Summary |
---|---|
Nhl.Api.Domain/Models/Draft/PlayerDraftRanking.cs | Introduced classes for draft-related data: PlayerDraftRanking , PlayerDraftYear , PlayerDraftCategory . |
Nhl.Api/Src/Api/NhlApi.cs | Added GetPlayerDraftRankingByYearAsync method. |
Nhl.Api/Src/PlayerApi/INhlPlayerApi.cs | Interface updated with GetPlayerDraftRankingByYearAsync method. |
Nhl.Api/Src/PlayerApi/NhlPlayerApi.cs | Implemented GetPlayerDraftRankingByYearAsync ; updated GetPlayerHeadshotImageAsync for clarity. |
Team Enumeration Updates
-
TeamEnum.cs
- Added
TeamActive
attribute to each team enumeration member.
- Added
-
TeamActiveAttribute.cs
- Introduced to annotate team enumerations with active status.
File Path | Change Summary |
---|---|
Nhl.Api.Common/Attributes/TeamActiveAttribute.cs | New attribute class TeamActiveAttribute added to mark NHL teams as active/inactive. |
Nhl.Api.Domain/Enumerations/Team/TeamEnum.cs | TeamActive attribute added to each team enum member indicating active status. |
Statistics API Improvements
NhlStatisticsApi.cs
- Updated methods to include
gameType
parameter, allowing users to filter statistics based on the type of game (e.g., regular season, playoffs).
- Updated methods to include
File Path | Change Summary |
---|---|
Nhl.Api/Src/StatisticsApi/NhlStatisticsApi.cs | Methods updated to include gameType parameter; enhances filtering of statistics. |
Refactoring and Code Quality
-
Sealed Classes and Static Properties:
DraftYear.cs
andSeasonYears.cs
changed to sealed classes.- Added static property
AllSeasons
for easy access to all seasons.
-
Switch Expressions:
- Refactored methods in
NhlTeamService.cs
to use switch expressions, improving code readability and performance.
- Refactored methods in
File Path | Change Summary |
---|---|
Nhl.Api.Domain/Models/Season/SeasonYears.cs | Class changed to sealed; added static property AllSeasons . |
Nhl.Api.Domain/Services/NhlTeamService.cs | Refactored methods to use switch expressions for better readability. |
Version Update
Updated project version from 3.5.0 to 3.6.0 in all project files.
File Path | Change Summary |
---|---|
Nhl.Api.Common/Nhl.Api.Common.csproj | Project version updated to 3.6.0. |
Nhl.Api.Domain/Nhl.Api.Domain.csproj | Project version updated to 3.6.0. |
Nhl.Api.Tests/Nhl.Api.Tests.csproj | Project version updated to 3.6.0. |
Nhl.Api/Nhl.Api.csproj | Project version updated to 3.6.0. |
Documentation Updates
README.md
- Updated documentation to include new methods and parameters.
- Enhanced clarity on API usage.
File Path | Change Summary |
---|---|
Nhl.Api/README.md | Documentation updated to reflect new methods and parameters; enhanced clarity on API usage. |
Thank you for using the Nhl.Api! Please open a GitHub issue if you need anything!
v3.5.0
Nhl.Api Updates
- Introduced two new asynchronous methods to the NHL API:
GetRealtimePlayerStatisticsBySeasonAndFilterExpressionAsync
GetTimeOnIcePlayerStatisticsBySeasonAndFilterExpressionAsync
- Enhanced functionality for retrieving player statistics.
- Allows access to real-time and time-on-ice statistics for players during specific seasons, with filtering and sorting options.
- Implemented nullable return types in the
NhlTeamService
interface. - Improved the retry mechanism in the testing attributes.
- Updated the README to reflect these changes.
Breakdown of Changes
Files | Change Summary |
---|---|
Nhl.Api/README.md | Added documentation for new asynchronous methods related to player statistics. |
Nhl.Api.Domain/Services/NhlTeamService.cs | Updated method signatures to nullable types and added handling for TeamEnum.UtahHockeyClub. |
Nhl.Api/Src/GameApi/NhlGameApi.cs | Modified GetGameCenterBoxScoreByGameIdAsync to perform concurrent data retrieval using asynchronous HTTP requests. |
Nhl.Api.Tests/Helpers/Attributes/TestMethodWithRetryAttribute.cs | Enhanced retry functionality with a new backoff strategy and updated default retry delay. |
Nhl.Api.Tests/TeamTests.cs | Reordered using directives for clarity. |
Nhl.Api.Tests/StatisticsTests.cs | Added multiple new test methods to validate player and goalie statistics across various seasons, including edge cases. |
v3.4.2
Release Notes for v3.4.2
Nhl.Api.Common
- Version Update: Updated version number from
3.4.1
to3.4.2
.
Nhl.Api.Domain
- Version Update: Updated version number from
3.4.1
to3.4.2
. - Enhancements:
- Updated
PlayerEnumFileGeneratorHelper.cs
to usevar
for variable declarations and enhanced theplayers
dictionary to include detailed player information. - Modified
GoalieProfile
andPlayerProfile
classes to handle nullable properties forHeightInInches
andBirthDate
, with updated logic forHeightInFeetAndInches
andAge
calculations. - Enhanced
ThreeStar
class properties to be nullable inGameCenterLanding.cs
.
- Updated
Nhl.Api.Tests
- Version Update: Updated version number from
3.4.1
to3.4.2
. - New Tests:
- Added
GetPlayerInformationAsync_Test_PlayerEnum_Returns_Valid_Information_Null_Age
to test player information retrieval with null age.
- Added
- Test Adjustments:
- Updated
StatisticsTests.cs
to assert player statistics count greater than 500 instead of 650.
- Updated
- Formatting:
- Minor formatting adjustment in
GameTests.cs
.
- Minor formatting adjustment in
Nhl.Api
- Version Update: Updated version number from
3.4.1
to3.4.2
.
These changes enhance the flexibility and robustness of the data model by supporting nullable properties and improve test coverage and accuracy.
v3.4.1
Refactor
- Introduced consistent coding standards across the project with a new .editorconfig file.
- Improved code readability and structure in various API components and services.
- Simplified syntax in several classes for better maintainability.
New Features
- Enhanced the GameCenterBoxScore model with new properties and a class for team game statistics.
Bug Fixes
- Corrected namespace declarations and syntax errors across the project.
- Fixed issues in HTTP client files for more reliable data fetching.
Tests
- Updated and added new assertions in test files for better coverage and reliability.
Chores
- Updated project version numbers for all components, indicating minor improvements and fixes.
v3.4.0
v3.4.0
New Features
Added methods to retrieve NHL player and goalie statistics for specific seasons with detailed filters.
Enhanced player API to include season year in headshot image retrieval, improving clarity and functionality.
Bug Fixes
Improved validation for seasonYear parameter in league API methods to better handle null values.
Documentation
Enabled documentation generation for the .NET framework 8.0 targeting project.
Refactor
Updated project versions to 3.4.0 across various components.
Modified instantiation of HttpClient and TeamService classes for better dependency management.
Tests
Added new test methods for project structure validation and string manipulation.
Chores
Updated GitHub Actions workflows to exclusively set up .NET version 8, removing previous versions setup.
v3.3.0
- New Features
- Introduced a new method to retrieve NHL players' game center statistics for specific seasons and game types.
- Added the
FullName
property in player profiles to display the full name of NHL players. - Updated functionality to correctly generate enum entries with associated summaries by transforming player data into a structured object before outputting it to the enum file.
- Bug Fixes
- Implemented a method to replace non-ASCII characters with their ASCII equivalents in strings.
- Documentation
- Enabled documentation generation for .NET frameworks 6.0, 7.0, and 8.0.
- Refactor
- Updated the project to version 3.3.0 across various components.
- Removed obsolete
CommonName
class usage and enhanced import directives for better clarity and maintenance.