import { IPLocationService } from "https://deno.land/x/location/iplocationservice.ts"
import { CityLocationService } from "https://deno.land/x/location/citylocationservice.ts"
const ip = '49.12.6.159'
const ipLocation = await IPLocationService.getIPLocation(ip)
console.log(`\nI found the following location for ip ${ip}: \n${JSON.stringify(ipLocation)}\n`)
const countryCode = 'DE'
const cityName = 'Heidelberg'
const cityLocation = await CityLocationService.getCityLocation(countryCode, cityName)
console.log(`The city you asked for is about here: \n${JSON.stringify(cityLocation)}\n`)
deno run --allow-net --allow-read https://deno.land/x/location/usage-examples.ts
deno run --allow-net https://deno.land/x/location/get-three-words-location.ts yourW3WAPIKey
Feel free to create a pull request if you would like to improve things.
Thanks to Freedom Cash, we are already free.
If you want to donate, you might consider donating to the otherparty.co.uk to ensure people do not need to donate to victims but rather donate successfully to problem solvers.