Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/suddi/woeid
Compute Yahoo! Where On Earth IDs for all countries
https://github.com/suddi/woeid
Last synced: about 1 month 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 (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-04-07T10:43:20.000Z (over 4 years ago)
- Last Synced: 2024-10-06T02:01:44.304Z (about 1 month 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
[![CircleCI](https://circleci.com/gh/suddi/woeid.svg?style=svg)](https://circleci.com/gh/suddi/woeid)
[![codecov](https://codecov.io/gh/suddi/woeid/branch/master/graph/badge.svg)](https://codecov.io/gh/suddi/woeid)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/46408c666119432abee43f991b79cc68)](https://www.codacy.com/app/suddir/woeid)
[![npm](https://img.shields.io/npm/v/woeid.svg)](https://www.npmjs.com/package/woeid)
[![npm](https://img.shields.io/npm/dt/woeid.svg)](https://www.npmjs.com/package/eslint-config-suddi)
[![David](https://img.shields.io/david/suddi/woeid.svg)](https://david-dm.org/suddi/woeid)
[![David](https://img.shields.io/david/dev/suddi/woeid.svg)](https://david-dm.org/suddi/woeid?type=dev)
[![license](https://img.shields.io/github/license/suddi/woeid.svg)](https://raw.githubusercontent.com/suddi/woeid/master/LICENSE)[![codecov](https://codecov.io/gh/suddi/woeid/branch/master/graphs/commits.svg)](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'
// }
````