nekoslife

Crates.ionekoslife
lib.rsnekoslife
version0.2.1
sourcesrc
created_at2021-07-08 14:01:21.750424
updated_at2021-07-08 14:13:36.576063
descriptionnekos.life wrapper library
homepage
repositoryhttps://github.com/AkiaCode/Nekos.life-rs
max_upload_size
id420337
size49,558
(AkiaCode)

documentation

https://docs.rs/nekoslife

README

Nekos.life-rs

Use

Add to dependencies:

[dependencies]
nekoslife = "0.2.1"

Features

[dependencies.nekoslife]
version = "0.2.1"

# disable nsfw
default-features = false
features = ["default-tls", "sfw"]

# or disable sfw
default-features = false
features = ["default-tls", "nsfw"]

In code

Example: get a waifu:

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let url: String = nekoslife::get(nekoslife::SfwCategory::Waifu).await?;

    println!("{}", url);

    Ok(())
}

With the blocking feature, just remove the .await.

Commit count: 25

cargo fmt