DbdTricky.Lib 1.1.1

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

DbdTricky.Net

NuGet

This project is not affiliated with Dead by Daylight or with https://dbd.tricky.lol.

A .NET library for interacting with the Dead by Daylight API provided by https://dbd.tricky.lol to quickly retrieve perks, characters, stats, and more! All endpoints listed here are supported.

Usage

With dependency injection

// When using dependency injection
var services = new ServiceCollection();
services.AddDbdTricky();
var sp = services.BuildServiceProvider();

var dbdTrickyClient = sp.GetRequiredService<IDbdTrickyClient>();

// Retrieve all dwight's perks, all endpoints are async and support cancellation tokens
var perks = await dbdTrickyClient.Perks.GetPerks("dwight", cancellationToken: default);

Without dependency injection

// Use defaults from DbdTrickyConfiguration for creating the HttpClient
var configuration = new DbdTrickyConfiguration();
var http = new HttpClient {
    BaseAddress = new Uri(configuration.BaseUrl),;
    DefaultRequestHeaders.Add("User-Agent", configuration.UserAgent);
};

// Create the client and retrieve all dwight's perks
var perksClient = new DbdTrickyPerksClient(http);
var perks = await perksClient.GetPerks("dwight", cancellationToken: default);

Configuration

var configuration = new DbdTrickyConfiguration {
    BaseUrl = new Uri("https://dbd.tricky.lol/api/"),
    UserAgent = "DbdTricky.Lib",
    ApiKey = "your-api-key" // I don't know how API keys work here, does nothing for now
};

// Add the service with the configuration created above, leave it empty to use the defaults
services.AddDbdTricky(configuration: configuration);

// You can also configure the HttpClient directly, note that you do need to set the BaseAddress and UserAgent headers.
services.AddDbdTricky(client => {
    // Use default configuration
    var conf = new DbdTrickyConfiguration();
    client.BaseAddress = new Uri(conf.BaseUrl);
    client.DefaultRequestHeaders.Add("User-Agent", conf.UserAgent);
    
    // Whatever you want to do with the HttpClient
    client.Timeout = TimeSpan.FromSeconds(10);
    client.AddPolicyHandler(Policy
        .HandleResult<HttpResponseMessage>(r => r.StatusCode == HttpStatusCode.TooManyRequests)
        .WaitAndRetryAsync(3, i => TimeSpan.FromSeconds(Math.Pow(2, i)))
    );
});
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.  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.1.1 119 12/11/2024
1.1.0 111 12/1/2024
1.0.1 114 11/19/2024
1.0.0 111 11/18/2024