ManiaAPI.NadeoAPI.Extensions.Hosting 2.2.0

dotnet add package ManiaAPI.NadeoAPI.Extensions.Hosting --version 2.2.0
                    
NuGet\Install-Package ManiaAPI.NadeoAPI.Extensions.Hosting -Version 2.2.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="ManiaAPI.NadeoAPI.Extensions.Hosting" Version="2.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ManiaAPI.NadeoAPI.Extensions.Hosting" Version="2.2.0" />
                    
Directory.Packages.props
<PackageReference Include="ManiaAPI.NadeoAPI.Extensions.Hosting" />
                    
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 ManiaAPI.NadeoAPI.Extensions.Hosting --version 2.2.0
                    
#r "nuget: ManiaAPI.NadeoAPI.Extensions.Hosting, 2.2.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.
#addin nuget:?package=ManiaAPI.NadeoAPI.Extensions.Hosting&version=2.2.0
                    
Install ManiaAPI.NadeoAPI.Extensions.Hosting as a Cake Addin
#tool nuget:?package=ManiaAPI.NadeoAPI.Extensions.Hosting&version=2.2.0
                    
Install ManiaAPI.NadeoAPI.Extensions.Hosting as a Cake Tool

ManiaAPI.NadeoAPI.Extensions.Hosting

NuGet

Provides an efficient way to inject all Nadeo services into your application.

Setup

Providing options.Credentials is optional, but setting it will automatically authorize on the first request and maintain that connection, so you don't have to call AuthorizeAsync.

using ManiaAPI.TrackmaniaAPI.Extensions.Hosting;

builder.Services.AddNadeoAPI(options =>
{
    options.Credentials = new NadeoAPICredentials(
        builder.Configuration["NadeoAPI:Login"]!,
        builder.Configuration["NadeoAPI:Password"]!,
        AuthorizationMethod.DedicatedServer);
});

Features this setup brings:

  • NadeoServices, NadeoLiveServices, and NadeoMeetServices will be available as transients
  • HTTP client will be handled properly
  • Credentials will be handled as a singleton
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 is compatible.  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. 
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
2.2.0 150 4/6/2025