Returns the ipinfo info using a callback.
Data gathered in IpinfoData:
import std.stdio : stdout, stderr; import ipinfo : getIpinfo, IpinfoData; getIpinfo(delegate(IpinfoData data, Exception err) { if (err) { stderr.writefln("%s", err); } else { stdout.writefln("ip: %s", data.ip); stdout.writefln("latitude: %s", data.latitude); stdout.writefln("longitude: %s", data.longitude); stdout.writefln("org: %s", data.org); stdout.writefln("city: %s", data.city); stdout.writefln("region: %s", data.region); stdout.writefln("country: %s", data.country); stdout.writefln("postal: %s", data.postal); } }); /* ip: 203.205.28.14 latitude: 37.385999999999996 longitude: -122.0838 org: AS15169 Google Inc. city: Mountain View region: California country: US postal: 94043 */
3.0.0
Boost Software License - Version 1.0
Get http://ipinfo.io with the D programming language.
Home page: https://github.com/workhorsy/d-ipinfo