a wrapper for GeoDB Cities
if you use npm
npm install geodb-cities
if you use yarn
yarn add geodb-cities
const geodb = require('geodb-cities');
(async () => {
const { data, pageInfo } = await geodb.findCountries({ limit: 1, page: 0 })
console.log(data);
/* Array of countries
[
{
code: 'VA',
currencyCodes: [ 'EUR' ],
name: 'Vatican City',
wikiDataId: 'Q237'
}
]
*/
console.log(pageInfo);
/* Information of page
{
currentPage: 0,
lastPage: 199,
totalCount: 199,
handleNextPage: true
}
*/
})();
To know all the limits of GeoDB
- limit: The maximum number (in the free version) for the
limit
parameter is 10.
Click for more info:
@ribeirogab |
---|
Contact me!
- E-mail
ribeirogabx@gmail.com