MikaelDui.RiotGames.Client
12.1.1.184
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.184
NuGet\Install-Package MikaelDui.RiotGames.Client -Version 12.1.1.184
<PackageReference Include="MikaelDui.RiotGames.Client" Version="12.1.1.184" />
paket add MikaelDui.RiotGames.Client --version 12.1.1.184
#r "nuget: MikaelDui.RiotGames.Client, 12.1.1.184"
// Install MikaelDui.RiotGames.Client as a Cake Addin #addin nuget:?package=MikaelDui.RiotGames.Client&version=12.1.1.184 // Install MikaelDui.RiotGames.Client as a Cake Tool #tool nuget:?package=MikaelDui.RiotGames.Client&version=12.1.1.184
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.
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 RiotGames.LeagueOfLegends;
using LeagueOfLegends client = new("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 LegendsOfRuneterraClient client = new("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 TeamfightTacticsClient client = new("ABCD-ABCD-ABCD-ABCD", PlatformRoute.NA1);
var leagueEntries = await client.GetLeagueEntriesAsync("some-summoner-ID");
foreach(var entry in leagueEntries)
Console.PrintLine($"Player #{entry.SummonerName}: {player.LeaguePoints} LP");
Getting a Valorant match
using RiotGames.Valorant;
using ValorantClient client = new("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 RiotGamesClient client = new("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 LeagueClient.LeagueOfLegendsClient client = new();
var session = await client.ChampSelect.GetSessionAsync();
foreach(var teamMember in session.MyTeam)
{
var summoner = await client.Summoners.GetSummonerAsync(teamMember);
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.