MikaelDui.RiotGames.Client
12.1.1.157
I've managed to get permabanned so I've ceased development on my Riot-related projects.
See the version list below for details.
dotnet add package MikaelDui.RiotGames.Client --version 12.1.1.157
NuGet\Install-Package MikaelDui.RiotGames.Client -Version 12.1.1.157
<PackageReference Include="MikaelDui.RiotGames.Client" Version="12.1.1.157" />
paket add MikaelDui.RiotGames.Client --version 12.1.1.157
#r "nuget: MikaelDui.RiotGames.Client, 12.1.1.157"
// Install MikaelDui.RiotGames.Client as a Cake Addin #addin nuget:?package=MikaelDui.RiotGames.Client&version=12.1.1.157 // Install MikaelDui.RiotGames.Client as a Cake Tool #tool nuget:?package=MikaelDui.RiotGames.Client&version=12.1.1.157
Riot Games .NET Client (unofficial)
An unofficial .NET Client for Riot Games and their games League of Legends, Legends of Runeterra, Teamfight Tactics and Valorant.
It features a purpose-built Open API client generator and is written with Vanilla C#.
There are auto-generated overloads so that you can pass a CLR object as parameter to the clients.
It's easily extendible. You can leverage its type safety and inherit the clients or just use its GetAsync/PostAsync/PutAsync methods if you need to do something that's not supported.
Download
You can find the latest releases here on GitHub and on NuGet.
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 Camille.Enums;
using RiotGames.LeagueOfLegends;
using (var client = new LeagueOfLegendsClient("ABCD-ABCD-ABCD-ABCD", PlatformRoute.NA1))
{
var summoner = await client.GetSummonerByNameAsync("some-summoner-name");
var masteries = await client.GetMasteriesAsync(summoner);
foreach(var mastery in masteries)
Console.PrintLine($"Champion #{mastery.ChampionId}: {mastery.championPoints} points");
}
Getting Legends of Runeterra leadersboard
using RiotGames.LegendsOfRuneterra;
using (var client = new LegendsOfRuneterraClient("ABCD-ABCD-ABCD-ABCD", RegionRoute.AMERICAS))
{
var leaderboards = await client.GetRankedLeaderboardsAsync();
foreach(var player in leaderboards.Players)
Console.PrintLine($"Player #{player.Name}: {player.Lp} LP");
}
Getting Teamfight Tactics league entires
using RiotGames.TeamfightTactics;
using (var client = new TeamfightTacticsClient("ABCD-ABCD-ABCD-ABCD", PlatformRoute.NA1))
{
var leagueEntries = await client.GetLeagueEntiresAsync("some-summoner-ID");
foreach(var entry in leagueEntries)
Console.PrintLine($"Player #{entry.SummonerName}: {player.LeaguePoints} LP");
}
Getting a Valorant match
using RiotGames.Valorant;
using (var client = new ValorantClient("ABCD-ABCD-ABCD-ABCD", ValPlatformRoute.EU))
{
var match = await client.GetMatchAsync("some-match-ID");
foreach(var player in match.Players)
Console.PrintLine($"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 (var client = new RiotGamesClient("ABCD-ABCD-ABCD-ABCD", 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.PrintLine($"Champion #{mastery.ChampionId}: {mastery.championPoints} points");
var lorLeaderboards = await client.LegendsOfRuneterra.GetRankedLeaderboardsAsync();
foreach(var player in lorLeaderboards.Players)
Console.PrintLine($"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 (var client = new LeagueClient())
{
var session = await client.LolChampSelect.GetSessionAsync();
foreach(var teamMember in session.MyTeam)
{
var summoner = await client.LolSummoners.GetSummonerAsync(teamMember.SummonerId);
Console.PrintLine($"Team member: {summoner.DisplayName}");
}
}
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 Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. 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. |
-
net6.0
- Camille.Enums (>= 3.0.0-nightly-2021-12-30-6d67c5d9bd)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.