sauce-api is an API for finding the source image for low-quality or cropped images.
Currently it only works with anime-styled images, but I hope to makeit capable of doing other kinds of images as well.
Asynchronous due to the usage of reqwest
, and works best with Tokio.
If you wish to see more, please submit PRs or a request in an issue!
```rust use sauceapi::source::{Output, iqdb::Iqdb, Source}; use sauceapi::error::Error;
async fn find_source(url: &str) { let source = Iqdb::create(()).await.unwrap(); let res: Result
match res {
Ok(result) => {
println!("Found results! {:?}", result);
}
Err(e) => {
eprintln!("Unable to find results: {}", e);
}
}
} ```
```rust use sauceapi::source::{Output, saucenao::SauceNao, Source}; use sauceapi::error::Error;
async fn findsource(url: &str, apikey: &str) { let source = SauceNao::create(apikey.tostring()).await.unwrap(); let res: Result
match res {
Ok(result) => {
println!("Found results! {:?}", result);
}
Err(e) => {
eprintln!("Unable to find results: {}", e);
}
}
} ```
sauce-api by default uses the native TLS framework, see this for specific details.
You may opt-in to using rustls if you would like to by enabling the rustls
feature like this:
toml
sauce-api = { version = "1.0.0", features = ["rustls"] }