Frenetik.iRacingApiWrapper 1.0.2

dotnet add package Frenetik.iRacingApiWrapper --version 1.0.2
                    
NuGet\Install-Package Frenetik.iRacingApiWrapper -Version 1.0.2
                    
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="Frenetik.iRacingApiWrapper" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Frenetik.iRacingApiWrapper" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Frenetik.iRacingApiWrapper" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Frenetik.iRacingApiWrapper --version 1.0.2
                    
#r "nuget: Frenetik.iRacingApiWrapper, 1.0.2"
                    
#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.
#:package Frenetik.iRacingApiWrapper@1.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Frenetik.iRacingApiWrapper&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=Frenetik.iRacingApiWrapper&version=1.0.2
                    
Install as a Cake Tool

Frenetik.iRacingApiWrapper

Version Downloads

Overview

This is a wrapper for the iRacing API service written in C#. It is still early in development. Use at your own risk and please report issues so they can be fixed. Thanks!

Submitting Issues

There are periodic updates to the iRacing API and I do not know how to track these updates. If you encounter any issues or have suggestions for improvements, please submit them via the GitHub issue tracker.

  1. Go to the Issues section of the repository.
  2. Click on the New Issue button.
  3. Provide a clear and descriptive title for your issue.
  4. Fill out the issue template with as much detail as possible, including steps to reproduce the issue, expected behavior, and any relevant screenshots or logs.
  5. Submit the issue.

IRacingApiService

The IRacingApiService is a service for interfacing with the iRacing API. It uses authentication and logging mechanisms to provide a reliable and secure way to interact with iRacing data.

Enabling API Usage

iRacing adopted 2FA in 2024 and requires you to now opt-in to legacy authentication.

  1. Goto https://oauth.iracing.com/accountmanagement/security/
  2. At the bottom of the options, enable Legacy Authentication

Usage

To use the IRacingApiService, follow these steps:

  1. Install necessary packages:

    dotnet add package Microsoft.Extensions.Options
    dotnet add package Microsoft.Extensions.Logging
    
  2. Configure settings:

    Create a configuration section in your appsettings.json file:

    {
        "IRacingDataSettings": {
            "BaseUrl": "https://members-ng.iracing.com/",
            "Username": "your_username",
            "Password": "your_password"
        }
    }
    
  3. Register services:

    In your Startup.cs or Program.cs file, register the necessary services:

    public void ConfigureServices(IServiceCollection services)
    {
        services.Configure<IRacingDataSettings>(Configuration.GetSection("IRacingDataSettings"));
        services.AddSingleton<IRacingApiService>();
        services.AddLogging();
    }
    
  4. Use the service:

    Inject and use the IRacingApiService in your application:

    public class RacingController : ControllerBase
    {
        private readonly IRacingApiService _racingApiService;
    
        public RacingController(IRacingApiService racingApiService)
        {
            _racingApiService = racingApiService;
        }
    
        // Your actions using IRacingApiService
    }
    

Test Project

There is a test project called TestWrapper that shows how to set this up in a console app.

Notes

  • Ensure you have the correct iRacing API credentials.
  • Handle exceptions and errors appropriately in your application.
  • Any suggestions on improving this project or the readme? Submit an issue, thanks!
Product Compatible and additional computed target framework versions.
.NET 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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows 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.2 108 6/28/2025
0.9.2 112 6/28/2025
0.9.1 171 3/22/2025
0.9.0 135 1/4/2025