MikaelDui.RiotGames.Client 12.5.1.347

.NET 5.0 .NET Standard 2.0
Suggested Alternatives

Camille.RiotApi

Additional Details

I've managed to get permabanned so I've ceased development on my Riot-related projects.

This package has a SemVer 2.0.0 package version: 12.5.1.347+995e491.
dotnet add package MikaelDui.RiotGames.Client --version 12.5.1.347
NuGet\Install-Package MikaelDui.RiotGames.Client -Version 12.5.1.347
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="MikaelDui.RiotGames.Client" Version="12.5.1.347" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MikaelDui.RiotGames.Client --version 12.5.1.347
#r "nuget: MikaelDui.RiotGames.Client, 12.5.1.347"
#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 MikaelDui.RiotGames.Client as a Cake Addin
#addin nuget:?package=MikaelDui.RiotGames.Client&version=12.5.1.347

// Install MikaelDui.RiotGames.Client as a Cake Tool
#tool nuget:?package=MikaelDui.RiotGames.Client&version=12.5.1.347

Riot Games .NET Client (unofficial)

Daily Test (@main) .NET CodeQL

image

An unofficial .NET Client for Riot Games and their games League of Legends, Legends of Runeterra, Teamfight Tactics and Valorant.

✅ Purpose-built Open API client generator

✅ Vanilla C# - Code generation done with Roslyn.

✅ Auto-generated overloads for CLR objects.

✅ Continuously tested against the live API.

✅ All tests required to be successful before deploy.

✅ Performance tested - the extra classes have no measurable impact.

✅ Optimized - you call the HttpClient almost directly.

Embedded symbols and Source link - see the source code while debugging.

Deterministic build - byte-for-byte output is identical across compilations.

❌ POST, PUT, DELETE and queries - for that, use other libraries for now (e.g. for RGAPI, Camille, and or LCU, PoniLCU).

❌ Game API - for that, use other libraries for now (e.g. Camille).

Sponsors

A big thank you for your support!

Sentry Logo JetBrains Logo (Main) logo

Demo

You can see the library running in your browser using Blazor at masteries.quest, which has a Cloudflare Workers proxy between the browser and Riot Games API.

Download

You can find the latest releases on GitHub Packages and on NuGet.org.

To install the latest version of the package, type the following in the package manager console:

Install-Package MikaelDui.RiotGames.Client
    

Or use the .NET CLI reference the latest stable and stay up-to-date:

dotnet add package MikaelDui.RiotGames.Client --version *

You can also use a PackageReference to stay up-to-date with the latest stable build:

<PackageReference Include="MikaelDui.RiotGames.Client" Version="*" />

Examples

Getting League of Legends masteries

using RiotGames.LeagueOfLegends;
using LeagueOfLegendsClient client = new("RGAPI-SUPERSECRET", Server.NA);

var summoner = await client.GetSummonerByNameAsync("Some summoner name");
var masteries = await client.GetMasteriesAsync(summoner);
foreach(var mastery in masteries)
    Console.WriteLine($"Champion #{mastery.ChampionId}: {mastery.championPoints} points");

Getting Legends of Runeterra leadersboard

using RiotGames.LegendsOfRuneterra;
using LegendsOfRuneterraClient client = new("RGAPI-SUPERSECRET", RegionRoute.AMERICAS);

var leaderboards = await client.GetRankedLeaderboardsAsync();
foreach(var player in leaderboards.Players)
    Console.WriteLine($"Player #{player.Name}: {player.Lp} LP");

Getting Teamfight Tactics league entires

using RiotGames.TeamfightTactics;
using TeamfightTacticsClient client = new("RGAPI-SUPERSECRET", PlatformRoute.NA1);

var leagueEntries = await client.GetLeagueEntriesAsync("some-summoner-ID");
foreach(var entry in leagueEntries)
    Console.WriteLine($"Player #{entry.SummonerName}: {player.LeaguePoints} LP");

Getting a Valorant match

using RiotGames.Valorant;
using ValorantClient client = new("RGAPI-SUPERSECRET", ValPlatformRoute.EU);

var match = await client.GetMatchAsync("some-match-ID");
foreach(var player in match.Players)
    Console.WriteLine($"Player #{player.Title} played champion #{player.ChampionId}");

Doing multi-game stuff

Using the RiotGamesClient class gives you easy access to multiple game clients at once.

using RiotGames;
using RiotGamesClient client = new("RGAPI-SUPERSECRET", PlatformRoute.NA1, ValPlatformRoute.NA);

var lolSummoner = await client.LeagueOfLegends.GetSummonerByNameAsync("some-summoner-name");
var lolMasteries = await client.LeagueOfLegends.GetMasteriesAsync(summoner);
foreach(var mastery in lolMasteries)
    Console.WriteLine($"Champion #{mastery.ChampionId}: {mastery.championPoints} points");

var lorLeaderboards = await client.LegendsOfRuneterra.GetRankedLeaderboardsAsync();
foreach(var player in lorLeaderboards.Players)
    Console.WriteLine($"Player #{player.Name}: {player.Lp} LP");

Getting the current League of Legends champ select

You can use the LeagueClient to communicate directly with the League Client (aka LCU).

using RiotGames.LeagueOfLegends.LeagueClient;
using LeagueClient.LeagueOfLegendsClient client = new();

var session = await client.ChampSelect.GetSessionAsync();
foreach(var teamMember in session.MyTeam)
{
    var summoner = await client.Summoners.GetSummonerAsync(teamMember);
    Console.WriteLine($"Team member: {summoner.DisplayName}");
}

Generated Code

The generated code looks like this:

image

Sub-packages

The client includes these sub-packages:

Notice from Riot Games

Riot Games .NET Client (unofficial) 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 Riot Games properties. Riot Games, and all associated properties are trademarks or registered trademarks of Riot Games, Inc.

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48 net481
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
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
12.5.1.347 151 3/20/2022
12.5.1.346 85 3/12/2022
12.5.1.345-pull-request.71 69 3/12/2022
12.4.1.343 113 2/20/2022
12.4.1.341 78 2/20/2022
12.4.1.340 79 2/19/2022
12.4.1.339-pull-request.65 69 2/19/2022
12.4.1.336 75 2/18/2022
12.4.1.335-pull-request.64 66 2/18/2022
12.4.1.333-pull-request.64 63 2/18/2022
12.4.1.323 78 2/18/2022
12.4.1.322-features.queries 73 2/18/2022
12.4.1.320 74 2/18/2022
12.4.1.319 74 2/18/2022
12.4.1.318 79 2/17/2022
12.4.1.313 79 2/16/2022
12.4.1.312 75 2/16/2022
12.4.1.311 79 2/16/2022
12.3.1.310 75 2/13/2022
12.3.1.309 74 2/13/2022
12.3.1.306 76 2/13/2022
12.3.1.305 78 2/11/2022
12.3.1.302 90 2/10/2022
12.3.1.300 85 2/7/2022
12.3.1.299 78 2/7/2022
12.3.1.298 76 2/7/2022
12.3.1.297 78 2/6/2022
12.3.1.296 74 2/6/2022
12.3.1.295 74 2/6/2022
12.3.1.294 76 2/6/2022
12.3.1.293 77 2/6/2022
12.3.1.292 73 2/6/2022
12.3.1.291 74 2/6/2022
12.3.1.290 76 2/6/2022
12.3.1.289 101 2/5/2022
12.3.1.288 89 2/2/2022
12.2.1.286 103 2/1/2022
12.2.1.285 89 2/1/2022
12.2.1.284 94 2/1/2022
12.2.1.283 93 2/1/2022
12.2.1.281 92 2/1/2022
12.2.1.280 94 1/31/2022
12.2.1.279 90 1/31/2022
12.2.1.278-pull-request.44 84 1/31/2022
12.2.1.276-pull-request.44 84 1/31/2022
12.2.1.274 91 1/31/2022
12.2.1.273-pull-request.43 83 1/31/2022
12.2.1.271 90 1/31/2022
12.2.1.270-pull-request.42 84 1/31/2022
12.2.1.269-features... 85 1/31/2022
12.2.1.268-features... 82 1/31/2022
12.2.1.267-features... 84 1/31/2022
12.2.1.266-features... 82 1/31/2022
12.2.1.263-features... 84 1/31/2022
12.2.1.262 93 1/30/2022
12.2.1.261-pull-request.39 83 1/30/2022
12.2.1.257 96 1/28/2022
12.2.1.256-pull-request.38 81 1/28/2022
12.2.1.254 99 1/27/2022
12.2.1.253-pull-request.37 79 1/27/2022
12.2.1.251 133 1/23/2022
12.2.1.250-pull-request.34 72 1/23/2022
12.2.1.248 91 1/23/2022
12.2.1.247-pull-request.33 82 1/23/2022
12.2.1.245 91 1/20/2022
12.2.1.244-pull-request.30 83 1/20/2022
12.1.1.242 92 1/19/2022
12.1.1.241-pull-request.29 82 1/19/2022
12.1.1.239 89 1/19/2022
12.1.1.238-pull-request.28 80 1/19/2022
12.1.1.234 94 1/19/2022
12.1.1.233-pull-request.27 79 1/19/2022
12.1.1.231 86 1/19/2022
12.1.1.230-pull-request.26 76 1/19/2022
12.1.1.228 86 1/19/2022
12.1.1.227-pull-request.25 78 1/19/2022
12.1.1.224 93 1/15/2022
12.1.1.223 92 1/15/2022
12.1.1.222 89 1/15/2022
12.1.1.221-pull-request.24 83 1/15/2022
12.1.1.220-pull-request.24 87 1/15/2022
12.1.1.219-features.websockets 83 1/15/2022
12.1.1.218-features.websockets 84 1/14/2022
12.1.1.217 96 1/13/2022
12.1.1.216 88 1/13/2022
12.1.1.215 92 1/13/2022
12.1.1.214 94 1/13/2022
12.1.1.213 83 1/13/2022
12.1.1.212 91 1/13/2022
12.1.1.211 95 1/13/2022
12.1.1.210-pull-request.22 86 1/13/2022
12.1.1.205 92 1/13/2022
12.1.1.201 95 1/11/2022
12.1.1.200 91 1/11/2022
12.1.1.199 93 1/11/2022
12.1.1.198-pull-request.21 87 1/11/2022
12.1.1.192 96 1/10/2022
12.1.1.190 99 1/10/2022
12.1.1.189 94 1/10/2022
12.1.1.188 95 1/10/2022
12.1.1.187 92 1/9/2022
12.1.1.186 92 1/9/2022
12.1.1.185 93 1/9/2022
12.1.1.184 89 1/9/2022
12.1.1.183 93 1/9/2022
12.1.1.180 95 1/9/2022
12.1.1.179 96 1/9/2022
12.1.1.177 94 1/9/2022
12.1.1.175 94 1/9/2022
12.1.1.170 99 1/9/2022
12.1.1.169-pull-request.19 88 1/9/2022
12.1.1.168-feature... 84 1/9/2022
12.1.1.167-feature... 83 1/9/2022
12.1.1.166-feature... 83 1/9/2022
12.1.1.165-feature... 84 1/9/2022
12.1.1.164-feature... 82 1/9/2022
12.1.1.163 90 1/8/2022
12.1.1.162 93 1/8/2022
12.1.1.157 89 1/8/2022
12.1.1.153 95 1/8/2022
12.1.1.152-pull-request.16 86 1/8/2022
12.1.1.147 91 1/8/2022
12.1.1.146-pull-request.15 84 1/8/2022
12.1.1.144-pull-request.15 84 1/8/2022
12.1.1.142-pull-request.15 81 1/8/2022
12.1.1.140 90 1/8/2022
12.1.1.139-pull-request.14 83 1/8/2022
12.1.1.136 94 1/8/2022
12.1.1.135-pull-request.13 83 1/8/2022
12.1.1.130 95 1/8/2022
12.1.1.129-pull-request.12 88 1/8/2022
12.1.1.128-feature... 84 1/8/2022
12.1.1.125 97 1/7/2022
12.1.1.124-pull-request.11 86 1/7/2022
12.1.1.122 91 1/7/2022
12.1.1.121-pull-request.11 80 1/7/2022
12.1.1.119 87 1/7/2022
12.1.1.118 89 1/7/2022
12.1.1.117 93 1/7/2022
12.1.1.116 90 1/7/2022
12.1.1.115 91 1/7/2022
12.1.1.114 92 1/7/2022
12.1.1.110 94 1/7/2022
12.1.1.87-feature... 86 1/7/2022
12.1.1.86-feature... 87 1/7/2022
12.1.1.85-feature... 88 1/7/2022
12.1.1.80-feature... 87 1/7/2022
12.1.1.79-feature... 86 1/7/2022
12.1.1.74-feature... 85 1/7/2022
12.1.1.72 94 1/7/2022
12.1.1.71-pull-request.7 83 1/7/2022
12.1.1.70-feature... 84 1/7/2022
12.1.1.69-feature... 86 1/7/2022
0.0.4-alpha 120 1/6/2022
0.0.3-alpha 121 1/6/2022