https://github.com/suddi/woeid
Compute Yahoo! Where On Earth IDs for all countries
https://github.com/suddi/woeid
Last synced: 5 months ago
JSON representation
Compute Yahoo! Where On Earth IDs for all countries
- Host: GitHub
- URL: https://github.com/suddi/woeid
- Owner: suddi
- License: mit
- Created: 2017-12-01T14:40:15.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-04-07T10:43:20.000Z (over 5 years ago)
- Last Synced: 2025-02-08T15:38:12.019Z (5 months ago)
- Language: JavaScript
- Size: 149 KB
- Stars: 6
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# woeid
[](https://circleci.com/gh/suddi/woeid)
[](https://codecov.io/gh/suddi/woeid)
[](https://www.codacy.com/app/suddir/woeid)
[](https://www.npmjs.com/package/woeid)
[](https://www.npmjs.com/package/eslint-config-suddi)
[](https://david-dm.org/suddi/woeid)
[](https://david-dm.org/suddi/woeid?type=dev)
[](https://raw.githubusercontent.com/suddi/woeid/master/LICENSE)[](https://codecov.io/gh/suddi/woeid)
Compute [Yahoo! Where On Earth IDs](https://developer.yahoo.com/geo/geoplanet/) for all countries.
## Installation
````
npm install --save woeid
````## Usage
### `getWoeid`
````js
const woeid = require('woeid');woeid.getWoeid('FRA');
// {
// 'country': 'France',
// 'woeid': 23424819,
// 'iso-3166-alpha3': 'FRA',
// 'iso-3166-alpha2': 'FR'
// }woeid.getWoeid('FR');
// {
// 'country': 'France',
// 'woeid': 23424819,
// 'iso-3166-alpha3': 'FRA',
// 'iso-3166-alpha2': 'FR'
// }
````### `getCountry`
````js
const woeid = require('woeid');woeid.getCountry(23424819);
// {
// 'country': 'France',
// 'woeid': 23424819,
// 'iso-3166-alpha3': 'FRA',
// 'iso-3166-alpha2': 'FR'
// }
````