Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ribeirogab/geodb-cities

🌍 ⠀a wrapper for GeoDB Cities REST API.
https://github.com/ribeirogab/geodb-cities

geodb-cities geodb-cities-api geonames

Last synced: about 1 month ago
JSON representation

🌍 ⠀a wrapper for GeoDB Cities REST API.

Awesome Lists containing this project

README

        

# 🌍 geodb-cities

> a wrapper for GeoDB Cities

## Getting Started

### Installation

if you use npm

```zsh
npm install geodb-cities
```

if you use yarn

```zsh
yarn add geodb-cities
```

### Example

```js
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](http://geodb-cities-api.wirefreethought.com/pricing)

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

## Features

Click for more info:

- [Find Countries](https://github.com/ribeirogab/geodb-cities/blob/main/doc/findCountries.md);
- [Find Country Regions](https://github.com/ribeirogab/geodb-cities/blob/main/doc/findCountryRegions.md):
- [Find Country Region Cities](https://github.com/ribeirogab/geodb-cities/blob/main/doc/findCountryRegionCities.md):

---

## Contributors

| | | | | | |
|:-:|:-:|:-:|:-:|:-:|:-:|

## Author

| [
@ribeirogab](https://github.com/ribeirogab) |
| :---: |

---

## Support

Contact me!

- E-mail `[email protected]`

---

## License

[![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](http://badges.mit-license.org)

- **[MIT license](http://opensource.org/licenses/mit-license.php)**