Irelia

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

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

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.

#

Examples

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

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

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

// The return type must be defined
// And can be any struct that implements serde::Deserialize
client.get("/lol-summoner/v1/current-summoner").await

} ```

```rust use irelia::{RequestClient, ingame::InGameClient}; use serdejson::Value;

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

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

game_client.active_player()

}

```