geodb-cities
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

🌍 geodb-cities

a wrapper for GeoDB Cities

Getting Started

Installation

if you use npm

npm install geodb-cities

if you use yarn

yarn add geodb-cities

Example

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
  }
  */
})();

Limits

To know all the limits of GeoDB

  • limit: The maximum number (in the free version) for the limit parameter is 10.

Features

Click for more info:


Contributors

Author


@ribeirogab

Support

Contact me!


License

License

Package Sidebar

Install

npm i geodb-cities

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

466 kB

Total Files

137

Last publish

Collaborators

  • ribeirogab