VOOZH about

URL: https://www.nuget.org/packages/BlossomiShymae.Briar/

⇱ NuGet Gallery | BlossomiShymae.Briar 0.2.3




👁 Image
BlossomiShymae.Briar 0.2.3

dotnet add package BlossomiShymae.Briar --version 0.2.3
 
 
NuGet\Install-Package BlossomiShymae.Briar -Version 0.2.3
 
 
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="BlossomiShymae.Briar" Version="0.2.3" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BlossomiShymae.Briar" Version="0.2.3" />
 
Directory.Packages.props
<PackageReference Include="BlossomiShymae.Briar" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BlossomiShymae.Briar --version 0.2.3
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: BlossomiShymae.Briar, 0.2.3"
 
 
#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.
#:package BlossomiShymae.Briar@0.2.3
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BlossomiShymae.Briar&version=0.2.3
 
Install as a Cake Addin
#tool nuget:?package=BlossomiShymae.Briar&version=0.2.3
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Briar

👁 NuGet Stable
👁 NuGet Downloads

Briar is a wrapper for the League Client and Game Client APIs which are unofficially provided by Riot Games.

This library is currently compatible with .NET 8 and higher for Windows and MacOS.

Contributors

<a href="https://github.com/BlossomiShymae/Briar/graphs/contributors"> <img src="https://contrib.rocks/image?repo=BlossomiShymae/Briar" /> </a>

Usage

Installation

dotnet install BlossomiShymae.Briar

Sample application

A demonstration of Briar with more code examples can be found here.

To run the demo, clone the repo and then do:

dotnet run --project BlossomiShymae.Briar.Demo

Requesting the LCU

This library uses the System.Net.Http.HttpClient interface via LcuHttpClient. It comes with a built-in handler that takes care of the request path and authorization header.

The built-in handler will attempt to refresh the port and auth if a HttpRequestException is encountered on request. InvalidOperationException will be thrown if the port of the current LCU process cannot be found or the port cannot be connected to.

Getting the LcuHttpClient instance
var client = Connector.GetLcuHttpClientInstance();
General request
var response = await client.SendAsync(new(HttpMethod.Get, "/lol-summoner/v1/current-summoner"));

var me = await response.Content.ReadFromJsonAsync<Summoner>();
GET request
var me = await client.GetFromJsonAsync<Summoner>("/lol-summoner/v1/current-summoner");
POST request with JSON body
var response = await client.PostAsJsonAsync("/player-notifications/v1/notifications", playerNotificationResource);

var resource = await response.Content.ReadFromJsonAsync<PlayerNotificationResource>();

ProcessFinder.IsActive() does not necessarily mean that the LCU process port is open for requests. Use ProcessFinder.IsPortOpen() instead.

Utilities
var leagueClientProcess = ProcessFinder.GetProcess();
var processInfo = ProcessFinder.GetProcessInfo();
var isActive = ProcessFinder.IsActive();
var isPortOpen = ProcessFinder.IsPortOpen();

var riotAuthentication = new RiotAuthentication(processInfo.RemotingAuthToken);

Requesting the Game Client

Getting the GameHttpClient instance
var client = Connector.GetGameHttpClientInstance();
General request
var response = await client.SendAsync(new(HttpMethod.Get, "/liveclientdata/activeplayername"));

var me = await response.Content.ReadFromJsonAsync<string>();
GET request
var me = await client.GetFromJsonAsync<string>("/liveclientdata/activeplayername");

LCU WebSocket

This library uses the Websocket.Client wrapper.

Create a client:

var client = Connector.CreateLcuWebsocketClient();

Listen to events, disconnections, or reconnection messages:

using System; // Include to avoid compiler errors CS1503, CS1660.
 // You may or may not need this.

client.EventReceived.Subscribe(msg =>
{
 Console.WriteLine(msg?.Data?.Uri);
});
client.DisconnectionHappened.Subscribe(msg => 
{
 if (msg.Exception != null) throw msg.Exception;
});
client.ReconnectionHappened.Subscribe(msg =>
{
 Console.WriteLine(msg.Type);
});

Use it:

// This starts the client in a background thread. You will need an event loop
// to listen to messages.
await client.Start();

// Subscribe to every event that the League Client sends.
var message = new EventMessage(EventRequestType.Subscribe, EventKinds.OnJsonApiEvent);
client.Send(message);

// We will need an event loop for the background thread to process.
while(true) await Task.Delay(TimeSpan.FromSeconds(1));
Product Versions Compatible and additional computed target framework versions.
.NET net8.0 net8.0 is compatible.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.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 (1)

Showing the top 1 popular GitHub repositories that depend on BlossomiShymae.Briar:

Repository Stars
BlossomiShymae/Needlework.Net
🪡 A .NET helper development tool for the LCU and Game Client!
Version Downloads Last Updated
0.2.3 255 7/5/2025
0.2.2 234 7/1/2025
0.2.1 219 7/1/2025
0.2.0 261 6/1/2025
0.1.0 188 6/1/2025