Aydsko.iRacingData 2304.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Aydsko.iRacingData --version 2304.1.0
NuGet\Install-Package Aydsko.iRacingData -Version 2304.1.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="Aydsko.iRacingData" Version="2304.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Aydsko.iRacingData --version 2304.1.0
#r "nuget: Aydsko.iRacingData, 2304.1.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 Aydsko.iRacingData as a Cake Addin
#addin nuget:?package=Aydsko.iRacingData&version=2304.1.0

// Install Aydsko.iRacingData as a Cake Tool
#tool nuget:?package=Aydsko.iRacingData&version=2304.1.0

Aydsko iRacing Data API

iRacing is the leading online racing simulation for PC. During events hosted via the iRacing service there is a large amount of data created related to race results and member participation in events.

This library allows access via .NET to the iRacing "Data API". These APIs allow a properly authenticated user a supported method of accessing data from the service.

Getting Started

1. Install the Aydsko iRacing Data API library.

The library is distributed as the Aydsko.iRacingData NuGet package. Install using your package manager of choice.

dotnet add package Aydsko.iRacingData

2. Register the client.

Register the iRacing Data API client classes with the service provider.

services.AddIRacingDataApi(options =>
{
    options.UserAgentProductName = "MyApplicationName";
    options.UserAgentProductVersion = new Version(1, 0);
});

3. Use the client.

Use the IDataClient from the service provider to authenticate and request data.

// Retrieve an instance from the service provider.
var dataClient = serviceProvider.GetRequiredService<IDataClient>();

// Supply your iRacing username and password.
dataClient.UseUsernameAndPassword(iRacingUsername, iRacingPassword);

// Retrieve information about our own account.
var infoResponse = await dataClient.GetMyInfoAsync(cancellationToken);

// Write that information to the console.
Console.WriteLine($"Driver name: {infoResponse.Data.DisplayName}");
Console.WriteLine($"Customer ID: {infoResponse.Data.CustomerId}");
Console.WriteLine($"Club: {infoResponse.Data.ClubName}");

Enable Caching of Results

1. Add the Microsoft memory caching package.

dotnet add package Microsoft.Extensions.Caching.Memory

2. Register the memory caching library with the service provider.

services.AddMemoryCache();

3. Register the caching client.

Register the iRacing Data API caching client classes with the service provider.

services.AddIRacingDataApiWithCaching(options =>
{
    options.UserAgentProductName = "MyApplicationName";
    options.UserAgentProductVersion = new Version(1, 0);
});

Then simply use the IDataClient as before.

Versioning

Ideally you should always use the latest version of the library that is available. This is because iRacing will sometimes introduce API changes during a release which make the old code incompatible.

This library will use version numbers will be in the format:

[YY][SS].[R]

Where:

  • YY = two digit year
  • SS = the iRacing season the library release was made in as a zero-padded number (i.e. 01, 02, 03, 04)
  • R = release number, which increments when changes are made although it may not be sequential

Example:

  • 2303.1 = changes compatible with iRacing 2023 Season 3 or later, and is release 1 during this season
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  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 is compatible.  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
2402.1.0 72 4/20/2024
2304.1.0 886 11/27/2023
2303.1.0 597 8/2/2023
2303.0.0 362 6/19/2023
0.10.0 211 5/4/2023
0.9.2 314 4/9/2023
0.9.1 160 4/8/2023
0.9.0 248 4/7/2023
0.8.0 286 3/12/2023
0.7.3 281 2/24/2023
0.7.2 258 2/9/2023
0.7.1 226 2/6/2023
0.7.0 269 12/23/2022
0.6.4 464 11/27/2022
0.6.3 303 11/27/2022
0.6.2 520 10/12/2022
0.6.1 396 9/28/2022
0.6.0 502 9/24/2022
0.5.1 370 9/19/2022
0.5.0 413 9/11/2022
0.4.1 608 7/11/2022
0.4.0 494 7/3/2022
0.3.0 413 6/1/2022
0.2.0 427 4/25/2022
0.1.2 413 4/14/2022
0.1.1 418 4/9/2022
0.1.0 410 3/26/2022
0.0.8 409 3/23/2022
0.0.7 405 3/5/2022
0.0.6 417 3/3/2022
0.0.5 421 2/27/2022
0.0.4 425 2/24/2022

Fixes / Changes:

- BREAKING CHANGE: Enumeration added for League Session "Status" field. (Issue: 182)
  - Previous "int" value available as "StatusRaw" property.

- Removal of legacy "Microsoft.AspNetCore.WebUtilities" dependency, replaced with custom code.

- .NET 8 Support
  - Projects are built using the .NET 8 SDK
  - Dependencies updated
  - .NET 8 targeted build included

- Check Club Image Paths (Issue: 189)

- Fix "Interval" property on "SubsessionChartLap" so it doesn't throw an exception when driver has been lapped, which is a valid situation.

- Fix "Implementing SaveCookies and RestoreCookies does not prevent unnecessary logins" (Issue: #186)
  - If you implement the "SaveCookies" and "RestoreCookies" methods and the cookies are for the correct domain, then the library will not attempt to login again.

- "DataClient" class is now "public" so it can be used outside of the library. It is still recommended to resolve the "IDataClient" interface from the DI container in most situations.

- Fix "Auth concurrency issues" (Issue #185)
  - The library now uses a semaphore to prevent multiple login attempts at the same time on the same instance of the "DataClient" class.



Contributions:

- From Tobias Zürcher (https://github.com/tobiaszuercher):
   - Add missing car_class_name & car_class_short_name (Pull Request: 190)

Thanks for helping out with pull requests to the library!



New Versioning Scheme:

Ideally you should always use the latest version of the library that is available. This is because iRacing will sometimes introduce API changes during a release which make the old code incompatible.

This library will use version numbers will be in the format:

   [YY][SS].[R]

Where:
- YY = two digit year
- SS = the iRacing season the library release was made in as a zero-padded number (i.e. 01, 02, 03, 04)
- R  = release number, which increments when changes are made although it may not be sequential

Example:

- 2303.1 = changes compatible with iRacing 2023 Season 3 or later, and is release 1 during this season