puter.drivers.call("ipgeo", ...)
Get geolocation information using the current IP address.
The ipgeo
method has a default parameter called ip
.
Both of these calls are equivalent:
// Using the default parameter
puter.call('ipgeo', '1.1.1.1');
// Using named parameters
puter.call('ipgeo', { ip: '1.1.1.1' });
ip
(string) (optional)
The IP address to fetch geolocation information for. If this is not specified, the IP address of the caller will be used. This location can vary based on how the Puter server is configured. For example, you may get geolocation information for the caller, but you may instead get geolocation information for the server hosting Puter.
The response matches what is provided by ipgeolocation.com.