LolHandbook.DataDragonClient 1.0.0

dotnet add package LolHandbook.DataDragonClient --version 1.0.0
NuGet\Install-Package LolHandbook.DataDragonClient -Version 1.0.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="LolHandbook.DataDragonClient" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LolHandbook.DataDragonClient --version 1.0.0
#r "nuget: LolHandbook.DataDragonClient, 1.0.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 LolHandbook.DataDragonClient as a Cake Addin
#addin nuget:?package=LolHandbook.DataDragonClient&version=1.0.0

// Install LolHandbook.DataDragonClient as a Cake Tool
#tool nuget:?package=LolHandbook.DataDragonClient&version=1.0.0

Data Dragon Client

NuGet badge

.NET client library for Riot's Data Dragon API that provides access to information about champions and items in League of Legends. This library is a component of the League Handbook app but also available as a standalone NuGet package that can be used in any .NET project.

Disclaimer: This library isn't endorsed by Riot Games and doesn't reflect the views or opinions of Riot Games or anyone officially involved in producing or managing League of Legends. League of Legends and Riot Games are trademarks or registered trademarks of Riot Games, Inc.

Quickstart

using LolHandbook.DataDragon;

IDataDragonClient client = new DataDragonClient("na");

// current patch version
string patchVersion = await client.GetPatchVersionAsync();

// champions
IDictionary<string, ChampionSummary> championSummaries = await client.GetChampionSummariesAsync();
ChampionSummary summary = championSummaries.Values.First(c => c.Name == "Annie");
ChampionDetail detail = await client.GetChampionDetailAsync(summary.Id);

// items
IDictionary<string, Item> items = await client.GetItemsAsync();

// summoner spells
IDictionary<string, SummonerSpell> summonerSpells = await client.GetSummonerSpellsAsync();

Caching

Since game data does not change often (new patches are typically released once every two weeks), it is beneficial to cache this data locally. A caching implementation is provided that will cache all calls except GetChampionDetailAsync. There is no built-in expiration mechanism, but you can manually invalidate the cache if needed.

var client = new CachingDataDragonClient("na");

// ... do stuff ...

// invalidate cache if you need to fetch new data
client.InvalidateCache();

Advanced configuration

When creating the client, you can pass in a custom RealmConfiguration that specifies one or more of the parameters below (anything that is not specified will use the default):

  • Cdn lets you override the default Data Dragon endpoint
  • PatchVersion lets you fetch data for an older patch version
  • Language lets you override the default language code for the realm

Example (specifying a patch version):

var configuration = new RealmConfiguration("na") { PatchVersion = "12.1.1" };
var client = new DataDragonClient(configuration);
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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 was computed.  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
1.0.0 183 7/17/2022