Crates.io | nekoslife |
lib.rs | nekoslife |
version | 0.2.1 |
source | src |
created_at | 2021-07-08 14:01:21.750424 |
updated_at | 2021-07-08 14:13:36.576063 |
description | nekos.life wrapper library |
homepage | |
repository | https://github.com/AkiaCode/Nekos.life-rs |
max_upload_size | |
id | 420337 |
size | 49,558 |
Add to dependencies:
[dependencies]
nekoslife = "0.2.1"
[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"]
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
.