8 unstable releases (3 breaking)

0.4.2 Feb 6, 2024
0.4.1 Oct 6, 2023
0.3.1 Jun 23, 2023
0.2.0 Mar 15, 2023
0.1.2 Jan 28, 2023

#4 in #lol

Download history 8/week @ 2023-11-02 12/week @ 2023-11-09 8/week @ 2023-11-16 14/week @ 2023-11-23 28/week @ 2023-11-30 11/week @ 2023-12-07 13/week @ 2023-12-14 21/week @ 2023-12-21 2/week @ 2023-12-28 5/week @ 2024-01-04 6/week @ 2024-01-11 13/week @ 2024-01-18 12/week @ 2024-01-25 33/week @ 2024-02-01 21/week @ 2024-02-08 107/week @ 2024-02-15

174 downloads per month

MIT license

81KB
2K SLoC

Irelia

Irelia is a set of bindings to native LoL APIs built on top of Hyper.

This crate provides support for Windows, with untested MacOS support.

Please note, League of Legends will not be playable on wine as of patch 14.5, and as such, the platform is no longer supported

Note: The base64 encoder used in irelia requires a .cargo/config.toml, an example can be found here

Cargo Features

This crate is designed with modularity in mind, and as such API support has been split into different cargo features.

By default, this crate only ships with the rest feature enabled.

  • ["full"] - enables support for all APIs
  • ["ws"] - enables support for the LCU websocket
  • ["in_game"] - enables support for the native in game API
  • ["tauri] - derives searialize on errors
  • ["batched"] - enabled the batched request system

Examples

use irelia::{RequestClient, rest::LCUClient};
use serde_json::Value;

/// Get the player from the client API
async fn get_summoner() -> Result<Option<Value>, LCUError> {
    // Create a new general request client
    let client = RequestClient::new();

    // Pass the client to the LCU connection
    let lcu_client = LCUClient::new()?;

    // The return type must be defined
    // And can be any struct that implements serde::Deserialize
    client.get("/lol-summoner/v1/current-summoner", &client).await
}
use irelia::{RequestClient, in_game::InGameClient};
use serde_json::Value;

/// Get the player from the in game API
async fn get_in_game_summoner() -> Result<ActivePlayer, LCUError> {
    // Create a new general request client
    let client = RequestClient::new();

    // Pass the client to the LCU connection
    let game_client = InGameClient::new()?;

    game_client.active_player(&client)
}

Dependencies

~7–41MB
~678K SLoC