https://github.com/akiacode/nekos.life-rs
Nekos.life API Rust Wrapper
https://github.com/akiacode/nekos.life-rs
neko-life nekos-life rust
Last synced: 7 months ago
JSON representation
Nekos.life API Rust Wrapper
- Host: GitHub
- URL: https://github.com/akiacode/nekos.life-rs
- Owner: AkiaCode
- License: mit
- Created: 2020-11-06T08:41:50.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-31T13:30:37.000Z (over 3 years ago)
- Last Synced: 2024-11-16T10:07:24.333Z (7 months ago)
- Topics: neko-life, nekos-life, rust
- Language: Rust
- Homepage: https://crates.io/crates/nekoslife
- Size: 34.2 KB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Nekos.life-rs
### Use
Add to dependencies:
```toml
[dependencies]
nekoslife = "0.2.1"
```### Features
```toml
[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:
```rs
#[tokio::main]
async fn main() -> Result<(), Box> {
let url: String = nekoslife::get(nekoslife::SfwCategory::Waifu).await?;println!("{}", url);
Ok(())
}
```With the `blocking` feature, just remove the `.await`.