Kunc.RiotGames.Lol.LeagueClientUpdate 0.2.0

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

// Install Kunc.RiotGames.Lol.LeagueClientUpdate as a Cake Tool
#tool nuget:?package=Kunc.RiotGames.Lol.LeagueClientUpdate&version=0.2.0                

Kunc.RiotGames.Lol.LeagueClientUpdate

Nuget

Simple client for interacting with the League of Legends LCU.

How to use

using Kunc.RiotGames.Lol.LeagueClientUpdate;

ILolLeagueClientUpdate lcu = LolLeagueClientUpdate.Create();

API requests

TODO

var obj = new { challengeIds = new long[] { -1, -1, -1 } };
await lcu.PostAsJsonAsync("lol-challenges/v1/update-player-preferences/", obj);

RootObject? obj1 = await lcu.GetFromJsonAsync<RootObject>("lol-summoner/v1/current-summoner");

class RootObject { /* Properties */ }

WebSocket

TODO

Event delegate

As a delegate you can use any method that has 0-3 parameters (the order of the parameters does not matter).

The parameters must be:

  • type sender: object, LolLeagueClientUpdate ,ILolLeagueClientUpdate
  • type eventArgs: here you can use any type that represents an object that was sent through WAMP
  • CancellationToken, token will by cancelled when WAMP is disconnect.
// Subcire event manually
lcu.Subscribe("/lol-gameflow/v1/gameflow-phase", (/* parameters */) => { /* code */ });
lcu.Subscribe([LcuEvent("/lol-gameflow/v1/gameflow-phase")] (/* parameters */) => { /* code */ });
lcu.Subscribe(new LcuEventAttribute("/lol-gameflow/v1/gameflow-phase"), (/* parameters */) => { /* code */ });

// Subscire all events from a given class
Lcu.SubscribeAll<SomeClass>();

class SomeClass
{
    [LcuEvent("/lol-gameflow/v1/gameflow-phase")]
    public void Method1()
    { }

    [LcuEvent("/lol-gameflow/v1/gameflow-phase")]
    public void Method2(LcuEventArgs<string> e)
    { 
        Console.WriteLine(e.Data);
    }

    [LcuEvent("/lol-gameflow/v1/gameflow-phase")]
    public void Method3(object sender, LcuEventArgs<string> e)
    { }

    [LcuEvent("/lol-gameflow/v1/gameflow-phase")]
    public void Method4(LolLeagueClientUpdate sender, LcuEventArgs<string> e, CancellationToken token)
    { }

    [LcuEvent("/lol-gameflow/v1/gameflow-phase")]
    public async Task Method5(ILolLeagueClientUpdate sender)
    { }
}

Disclaimer

Kunc.RiotGames.Lol.LeagueClientUpdate 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 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. 
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
0.2.0 120 8/13/2024
0.1.8 74 7/26/2024
0.1.7 96 6/28/2024
0.1.6 94 6/18/2024
0.1.5 93 6/2/2024
0.1.4 114 4/24/2024
0.1.3 164 10/8/2023
0.1.2 155 5/23/2023
0.1.1 239 2/22/2023
0.1.0 265 1/17/2023