@plasma-platform/service-geo
v0.0.4
Published
Geo Service API
Downloads
7
Readme
Full documentation
install:npm i @plasma-platform/service-users -S
Short documentation
Table of Contents
GeoService
Users Micro Service API
Parameters
url
string service urltoken
(string | null) user access tocken if available (optional, defaultnull
)
messages
Object with class service messages
Type: object
getCityByIpAddress
Cities - Get city by ip address
Parameters
params
Object ip: IP address.
Examples
(async () => {
const service = new Service('//api.templatemonsterdev.com/geo/v1/');
const request = await service.getCityByIpAddress('192.168.2.59');
})();
Returns Promise<cityInfo>
getIpInfo
Cities - Get info by ip address
Parameters
params
Object ip: IP address.
Examples
(async () => {
const service = new Service('//api.templatemonsterdev.com/geo/v1/');
const request = await service.getIpInfo('192.168.2.59');
})();
Returns Promise<ipInfo>
getCountries
Geo - getCountries
Examples
(async () => {
const service = new Service('//api.templatemonsterdev.com/geo/v1/');
const request = await service.getCountries('192.168.2.59');
})();
Returns Promise<listCountries>