abuseipdb2 0.3.1

A Rust library for the AbuseIPDB API v2
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::{net::IpAddr, str::FromStr};

use abuseipdb2::Client;

#[tokio::main]
async fn main() {
    let client = Client::new(std::env::var("ABUSEIPDB_KEY").unwrap());

    let check = client
        .check(IpAddr::from_str("127.0.0.1").unwrap(), None, Some(true))
        .await
        .unwrap();

    println!("{:?}", check);
}