Skip to content

Latest commit

 

History

History
111 lines (94 loc) · 2.61 KB

docs.md

File metadata and controls

111 lines (94 loc) · 2.61 KB

Functions

returnRegionInfo(region)
returnSubRegionInfo(subregion)
searchByTranslation(translation)
searchByCurrency(currency)
searchByCapital(capital)
returnAll()

returnRegionInfo(region)

Kind: global function

Param Type Description
region string Region to search data for

Example

gw.returnRegionInfo("europe")
    .then((data) => {
        console.log(JSON.stringify(data, null, 4));
    })
    .catch(err => {
        console.log(err)
 {JSON}

returnSubRegionInfo(subregion)

Kind: global function

Param Type Description
subregion string the Sub Region to look up

Example

gw.returnSubRegionInfo("Eastern Asia")
    .then((stuff) => {
        console.log(JSON.stringify(stuff, null, 4))
    })
    .catch(err => {
        console.log(err);
 {JSON}

searchByTranslation(translation)

Kind: global function

Param Type Description
translation string translation to search by, strange becuase if I put in "america" or any other country it works ??

Example

gw.searchByTranslation("america")
    .then(x => {
        console.log(JSON.stringify(x, null, 4));
    })
    .catch(err => {
        console.log(err);
 {JSON}

searchByCurrency(currency)

Kind: global function

Param Type Description
currency string currency to search {JSON} gw.searchByCurrency("euro") .then(x => { console.log(JSON.stringify(x));
}) .catch(err => { throw new Error(err) }) s

searchByCapital(capital)

Param Type Description
capital string Capital city to search

Example gw.searchByCapital("Bern") .then(x => { console.log(JSON.stringify(x)); }) .catch(err => { throw new Error(err) {JSON}

<a name="returnAll"></a>
## returnAll()
**Kind**: global function
**Example**
```js
gw.returnAll()
    .then((whatamidoingwithmylife) => {
        console.log(JSON.stringify(whatamidoingwithmylife, null, 4))
 {JSON}