aghpb 1.1.0

Anime girls holding programming books API wrapper for ๐Ÿฆ€Rust.
Documentation

๐Ÿฆ€ aghpb.rs ๐Ÿ“š

Rust API wrapper for the anime girls holding programming books API

Crates.io docs.rs

BTW, my first ever rust library.

Install

cargo add aghpb

More install instructions at crates.io.

Examples

This is how you may retrieve a random anime girls holding programming books:

use std::error::Error;

#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
    let book = aghpb::random(None).await?;

    println!("Name: {}", book.name);
    println!("Category: {}", book.category);

    book.image.save("./anime_girl.png")?;

    Ok(())
}

You can also retrieve specific categories of anime girls holding programming books like so:

let book = aghpb::random(Some("rust".to_string())).await?;

This is how you may retrieve a list of available categories:

use std::error::Error;

#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
    let categories = aghpb::categories().await?;

    for category in categories {
        println!("{}", category);
    }

    Ok(())
}

Made using my API at ๐Ÿ‘‰ https://api.devgoldy.xyz/aghpb/v1/