Function ipinfodb::query [] [src]

pub fn query(api_key: &str, ip: Option<IpAddr>) -> Result<GeoInfo, Error>

Queries api for geolocation info. 'api_key' The api key provided from ipinfodb, needed for making requests against api. 'ip' The ip to query geolocation for, optional, if left out, the api will query current's ip geolocation.