use ipdatainfo::Client;
fn main() {
let client = Client::new();
let info = client.lookup("8.8.8.8").expect("lookup failed");
println!(
"{} is in {:?}, {:?} (ASN {:?} — {:?})",
info.ip, info.city, info.country, info.asn, info.asn_org
);
let threat = client
.threat_domain("example.com")
.expect("threat lookup failed");
println!("example.com listed as a threat: {}", threat.listed);
}