-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #208 from AdrianJSClark/205-support-driver-stats-b…
…y-category-csv-download Driver Statistics CSV Retrieval
- Loading branch information
Showing
7 changed files
with
136 additions
and
24 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
src/Aydsko.iRacingData.IntegrationTests/Stats/DriverStatisticsByCategoryCsvTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
namespace Aydsko.iRacingData.IntegrationTests.Stats; | ||
|
||
internal sealed class DriverStatisticsByCategoryCsvTests : DataClientIntegrationFixture | ||
{ | ||
[Test] | ||
public async Task TestDriverStatisticsByCategoryCsvAsync() | ||
{ | ||
var driverStats = await Client.GetDriverStatisticsByCategoryCsvAsync(4).ConfigureAwait(false); | ||
|
||
Assert.Multiple(() => | ||
{ | ||
Assert.That(driverStats, Is.Not.Null); | ||
Assert.That(driverStats.FileName, Is.Not.Null.Or.Empty); | ||
Assert.That(driverStats.FileName, Is.EqualTo("Dirt_Road_driver_stats.csv")); | ||
Assert.That(driverStats.ContentBytes, Is.Not.Null); | ||
Assert.That(driverStats.ContentBytes, Is.Not.Empty); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
BREAKING CHANGES: | ||
|
||
- "Aydsko.iRacingData.Results.SessionResultsWeather" several properties have had their type changed to "decimal" to properly represent the data. (Issue: 202) | ||
- "Aydsko.iRacingData.Results.SessionResultsWeather" several properties have had their type changed to "decimal" to properly represent the data. (Issue: #202) | ||
|
||
|
||
|
||
Fixes / Changes: | ||
|
||
- New property "AverageLapTime" on "Aydsko.iRacingData.Results.RaceSummary" to give a proper duration representation of the "AverageLap" value. | ||
- Support "Driver Stats by Category CSV" Download (Issue: #205) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
namespace Aydsko.iRacingData.Stats; | ||
|
||
/// <summary>Represents a comma separated value (CSV) file containing statistics about a category of drivers.</summary> | ||
/// <seealso cref="IDataClient.GetDriverStatisticsByCategoryCsvAsync(int, CancellationToken)"/> | ||
/// <seealso cref="Constants.Category"/> | ||
public class DriverStatisticsCsvFile | ||
{ | ||
/// <summary>The Category Id value used to retrieve these statistics.</summary> | ||
public int CategoryId { get; set; } | ||
|
||
/// <summary>The name of the file.</summary> | ||
public string FileName { get; set; } = default!; | ||
|
||
/// <summary>Content of the CSV file.</summary> | ||
public byte[] ContentBytes { get; set; } = default!; | ||
} |