Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Currently available data for each country is:
- **constitutional_form** - official political system
- **language_codes** - list of langauge codes (combination of _ISO 639-1_ and _ISO 3166-1 alpha-2_)
- **is_landlocked** - information whether country is surrounded by one or more countries
- **independence_year** - year when country gained independence

You can check all changes in the project at [releases page on Github][URL_GH_RELEASES]
or in [changelog][DOC_CHANGELOG].
Expand Down Expand Up @@ -140,6 +141,7 @@ Type definition of each `Country {Object}`:
* @property {String} constitutional_form - Name of official political system
* @property {String[]} language_codes - Array of language codes
* @property {Boolean} is_landlocked - Is country surrounded by one or more countries
* @property {Number} independence_year - Country independence year
*/
```

Expand Down Expand Up @@ -168,7 +170,8 @@ Sample `Country {Object}`:
tld: '.pl',
constitutional_form: 'republic',
language_codes: ['pl-PL'],
is_landlocked: false
is_landlocked: false,
independence_year: 1918,
}
```

Expand Down Expand Up @@ -327,6 +330,17 @@ wcc.getCountriesByLandLock(isLandLocked)
// Example: wcc.getCountriesByLandLock(true)
```

```js
/**
* Get list of countries that gained independence in range of years
* @param {Number} from - starting year
* @param {Number} [to] - ending year or current year (if not passed)
* @returns {Country[]}
*/
wcc.getCountriesByIndependenceYearRange(from, to)
// Example: wcc.getCountriesByIndependenceYearRange(1400, 1950)
```

❗️ All params are **NOT** case sensitive so no matter how argument looks,
the response will remain the same.

Expand Down
Loading