An API for http://ip-api.com/ written in the Rust language.
Dual-licensed under MIT or the UNLICENSE.
This library lets you request information about an IP address. It uses futures
to deliver the result.
pub struct Response {
pub query: String,
pub country: Option<NameAndCode>, // NameAndCode { name: String, code: String }
pub region: Option<NameAndCode>,
pub city: Option<String>,
pub zip: Option<String>,
pub location: Option<Coordinates>, // Cooridnates { latitude: f32, longitude: f32 }
pub timezone: Option<String>,
pub isp: Option<String>,
pub organization: Option<String>,
pub autonomous_system: Option<String>,
pub reverse: Option<String>,
pub mobile: bool,
pub proxy: bool,
}
You need Rust 1.26 or later for impl Trait
.