#api #async #tokio #brawlhalla #gameapi


An async Brawlhalla API Wrapper using tokio

5 releases

0.1.4 Apr 20, 2020
0.1.3 Apr 3, 2020
0.1.2 Apr 3, 2020
0.1.1 Apr 3, 2020
0.1.0 Apr 3, 2020

#142 in #tokio

23 downloads per month

Custom license

428 lines


Rust wrapper for the Brawlhalla API.


brawlhalla - An async Brawlhalla API Wrapper using tokio

With this crate, you can now conveniently call the official Brawlhalla API from Rust! At this point in time, this crate has 100% API coverage, but no additional functionality.

Creating an API Connector

To call the API, you must first create an APIConnection. To do so, you should use a ConnectionBuilder. A typical API call would look like this:

extern crate brawlhalla;
use brawlhalla::ConnectionBuilder;
async fn main() -> Result<(), brawlhalla::APIError> {
    let conn = ConnectionBuilder::default() // Make a builder struct
        .with_apikey("your personal API key") // Configure your API key
        .build(); // Create an APIConnection from the template

    let legends = conn.legends().await?; // Retrieves data about all legends
    println!("{}", legends[0].bio_aka());

At this time, the API can only be called via async/tokio.


~201K SLoC