Crates.io | okaeri-sdk |
lib.rs | okaeri-sdk |
version | 1.2.4 |
source | src |
created_at | 2021-03-17 12:44:16.027284 |
updated_at | 2021-05-10 21:16:45.897082 |
description | Okaeri Services SDK |
homepage | https://wiki.okaeri.eu/en/sdk |
repository | https://github.com/OkaeriPoland/okaeri-sdk-rust |
max_upload_size | |
id | 370112 |
size | 14,735 |
Currently supported services:
Full documentation available on wiki.okaeri.eu in:
okaeri-sdk = "1.*"
See full docs in: Polish, English
use okaeri_sdk::aicensor::AiCensor;
#[tokio::main]
async fn main() {
let aicensor = AiCensor::new("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX")?;
let prediction = aicensor.get_prediction("o cie k u r//w@!").await?;
let swear = prediction.general.swear;
println!("swear: {}", swear);
}
See full docs in: Polish, English
use okaeri_sdk::noproxy::NoProxy;
#[tokio::main]
async fn main() {
let noproxy = NoProxy::new("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX")?;
let info = noproxy.get_info("1.1.1.1").await?;
let proxy = info.risks.proxy;
let verify = info.suggestions.verify;
let block = info.suggestions.block;
println!("proxy: {}, verify: {}, block: {}", proxy, verify, block);
}