3 unstable releases

0.2.1 Mar 30, 2020
0.2.0 Nov 29, 2019
0.1.0 Nov 29, 2019

#1592 in #api-client

MIT license

21KB
400 lines

Build Status Crate Docs

rust-abuseipdb

Rust client for the AbuseIPDB API
Documentation hosted on docs.rs.

abuseipdb = "0.2.1"

Example usage

use abuseipdb::Client;
use std::net::Ipv4Addr;

async fn example() {
    let my_ip = Ipv4Addr::new(127, 0, 0, 1).into();
    let client = Client::new("<API-KEY>");
    let response = client.check(my_ip, None, false).await.unwrap();
    println!("abuseConfidenceScore: {}", response.data.abuse_confidence_score);
}

lib.rs:

AbuseIPDB API Client.

use abuseipdb::Client;
use std::net::Ipv4Addr;

async fn example() {
    let my_ip = Ipv4Addr::new(127, 0, 0, 1).into();
    let client = Client::new("<API-KEY>");
    let response = client.check(my_ip, None, false).await.unwrap();
    println!("abuseConfidenceScore: {}", response.data.abuse_confidence_score);
}

Dependencies

~8–19MB
~288K SLoC