0.1.6 • Published 6 years ago
oop-workshop-library v0.1.6
IP Geo
const ip = '134.234.3.2';
const url = 'http://ip-api.com/json/';
const userInfo = new GetInfoByIp(ip, url);
const Location = await userInfo.getLocation();
console.log(`из города ${Location.city}, в ${Location.region} ${Location.country}`)
// из города Sierra Vista (Fort Huachuca), в Arizona United States