Skip to content

Latest commit

 

History

History
99 lines (65 loc) · 2 KB

README.md

File metadata and controls

99 lines (65 loc) · 2 KB

🌍 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