dehashed-rs
This is an SDK for the dehashed api.
Usage
use *;
let email = "test@example.com".to_string;
let api_key = "<api_key>".to_string;
// Create an api instance
let api = new.unwrap;
// Query for the domain example.com
if let Ok = api
.search
.await
or if you enable the tokio
feature, you can utilize the scheduler to abstract
away the need to manage get past the rate limit:
use *;
use oneshot;
let email = "test@example.com".to_string;
let api_key = "<api_key>".to_string;
// Create an api instance
let api = new.unwrap;
// Create the scheduler
let scheduler = api.start_scheduler;
let tx = scheduler.retrieve_sender;
let = channel;
// Schedule a query for the email "test@example.com"
tx.send
.await
.unwrap;
// Retrieve the result
if let Ok = ret_rx.await
If you need type definitions for utoipa, there available under the feature flag utoipa
.
Note
This is not an official API