ipdatainfo 0.1.0

Official Rust client for the ipdata.info IP geolocation, ASN, and threat-intelligence API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Hits the real free-tier endpoint. Excluded from the default `cargo test`
//! run; execute explicitly with `cargo test -- --ignored`.

use ipdatainfo::Client;

#[test]
#[ignore]
fn live_lookup_returns_real_data() {
    let client = Client::new();
    let info = client.lookup("8.8.8.8").expect("live lookup should succeed");
    assert!(info.success);
    assert_eq!(info.ip, "8.8.8.8");
}