mirror of
https://gitlab.com/restcountries/restcountries.git
synced 2026-03-31 15:07:46 +01:00
Adding TODO and fixing URL for this project.
This commit is contained in:
@@ -2,7 +2,12 @@
|
|||||||
This project is inspired on restcountries.eu. As it hasn't had any activity in at least 14 months, I decided to take action :)
|
This project is inspired on restcountries.eu. As it hasn't had any activity in at least 14 months, I decided to take action :)
|
||||||
|
|
||||||
# REST Countries
|
# REST Countries
|
||||||
You can access API through https://restcountries.com/v2/all
|
You can access API through https://restcountries.com/v2/all
|
||||||
|
|
||||||
|
# TODO:
|
||||||
|
* [x] Add SSL
|
||||||
|
* [ ] Solve many issues reported in the GitHub page for original countries
|
||||||
|
* [ ] Add Chinese, Taiwanese and Hongkonian
|
||||||
|
|
||||||
# API Endpoints
|
# API Endpoints
|
||||||
|
|
||||||
@@ -11,7 +16,7 @@ Below are described the REST endpoints available that you can use to search for
|
|||||||
## All
|
## All
|
||||||
|
|
||||||
``` html
|
``` html
|
||||||
https://restcountries.eu/rest/v2/all
|
https://restcountries.com/rest/v2/all
|
||||||
```
|
```
|
||||||
|
|
||||||
## Name
|
## Name
|
||||||
@@ -19,15 +24,15 @@ https://restcountries.eu/rest/v2/all
|
|||||||
Search by country name. It can be the native name or partial name
|
Search by country name. It can be the native name or partial name
|
||||||
|
|
||||||
``` javascript
|
``` javascript
|
||||||
https://restcountries.eu/rest/v2/name/{name}
|
https://restcountries.com/rest/v2/name/{name}
|
||||||
```
|
```
|
||||||
|
|
||||||
``` html
|
``` html
|
||||||
https://restcountries.eu/rest/v2/name/eesti
|
https://restcountries.com/rest/v2/name/eesti
|
||||||
```
|
```
|
||||||
|
|
||||||
``` html
|
``` html
|
||||||
https://restcountries.eu/rest/v2/name/united
|
https://restcountries.com/rest/v2/name/united
|
||||||
```
|
```
|
||||||
|
|
||||||
## Full Name
|
## Full Name
|
||||||
@@ -35,11 +40,11 @@ https://restcountries.eu/rest/v2/name/united
|
|||||||
Search by country full name
|
Search by country full name
|
||||||
|
|
||||||
``` javascript
|
``` javascript
|
||||||
https://restcountries.eu/rest/v2/name/{name}?fullText=true
|
https://restcountries.com/rest/v2/name/{name}?fullText=true
|
||||||
```
|
```
|
||||||
|
|
||||||
``` html
|
``` html
|
||||||
https://restcountries.eu/rest/v2/name/aruba?fullText=true
|
https://restcountries.com/rest/v2/name/aruba?fullText=true
|
||||||
```
|
```
|
||||||
|
|
||||||
## Code
|
## Code
|
||||||
@@ -48,15 +53,15 @@ https://restcountries.eu/rest/v2/name/aruba?fullText=true
|
|||||||
Search by ISO 3166-1 2-letter or 3-letter country code
|
Search by ISO 3166-1 2-letter or 3-letter country code
|
||||||
|
|
||||||
``` javascript
|
``` javascript
|
||||||
https://restcountries.eu/rest/v2/alpha/{code}
|
https://restcountries.com/rest/v2/alpha/{code}
|
||||||
```
|
```
|
||||||
|
|
||||||
``` html
|
``` html
|
||||||
https://restcountries.eu/rest/v2/alpha/co
|
https://restcountries.com/rest/v2/alpha/co
|
||||||
```
|
```
|
||||||
|
|
||||||
``` html
|
``` html
|
||||||
https://restcountries.eu/rest/v2/alpha/col
|
https://restcountries.com/rest/v2/alpha/col
|
||||||
```
|
```
|
||||||
|
|
||||||
## List of codes
|
## List of codes
|
||||||
@@ -64,11 +69,11 @@ https://restcountries.eu/rest/v2/alpha/col
|
|||||||
Search by list of ISO 3166-1 2-letter or 3-letter country codes
|
Search by list of ISO 3166-1 2-letter or 3-letter country codes
|
||||||
|
|
||||||
``` javascript
|
``` javascript
|
||||||
https://restcountries.eu/rest/v2/alpha?codes={code};{code};{code}
|
https://restcountries.com/rest/v2/alpha?codes={code};{code};{code}
|
||||||
```
|
```
|
||||||
|
|
||||||
``` html
|
``` html
|
||||||
https://restcountries.eu/rest/v2/alpha?codes=col;no;ee
|
https://restcountries.com/rest/v2/alpha?codes=col;no;ee
|
||||||
```
|
```
|
||||||
|
|
||||||
## Currency
|
## Currency
|
||||||
@@ -76,10 +81,10 @@ https://restcountries.eu/rest/v2/alpha?codes=col;no;ee
|
|||||||
Search by ISO 4217 currency code
|
Search by ISO 4217 currency code
|
||||||
|
|
||||||
``` javascript
|
``` javascript
|
||||||
https://restcountries.eu/rest/v2/currency/{currency}
|
https://restcountries.com/rest/v2/currency/{currency}
|
||||||
```
|
```
|
||||||
``` html
|
``` html
|
||||||
https://restcountries.eu/rest/v2/currency/cop
|
https://restcountries.com/rest/v2/currency/cop
|
||||||
```
|
```
|
||||||
|
|
||||||
## Language
|
## Language
|
||||||
@@ -87,10 +92,10 @@ https://restcountries.eu/rest/v2/currency/cop
|
|||||||
Search by ISO 639-1 language code
|
Search by ISO 639-1 language code
|
||||||
|
|
||||||
``` javascript
|
``` javascript
|
||||||
https://restcountries.eu/rest/v2/lang/{et}
|
https://restcountries.com/rest/v2/lang/{et}
|
||||||
```
|
```
|
||||||
``` html
|
``` html
|
||||||
https://restcountries.eu/rest/v2/lang/es
|
https://restcountries.com/rest/v2/lang/es
|
||||||
```
|
```
|
||||||
|
|
||||||
## Capital city
|
## Capital city
|
||||||
@@ -98,10 +103,10 @@ https://restcountries.eu/rest/v2/lang/es
|
|||||||
Search by capital city
|
Search by capital city
|
||||||
|
|
||||||
``` javascript
|
``` javascript
|
||||||
https://restcountries.eu/rest/v2/capital/{capital}
|
https://restcountries.com/rest/v2/capital/{capital}
|
||||||
```
|
```
|
||||||
``` html
|
``` html
|
||||||
https://restcountries.eu/rest/v2/capital/tallinn
|
https://restcountries.com/rest/v2/capital/tallinn
|
||||||
```
|
```
|
||||||
|
|
||||||
## Calling code
|
## Calling code
|
||||||
@@ -109,10 +114,10 @@ https://restcountries.eu/rest/v2/capital/tallinn
|
|||||||
Search by calling code
|
Search by calling code
|
||||||
|
|
||||||
``` javascript
|
``` javascript
|
||||||
https://restcountries.eu/rest/v2/callingcode/{callingcode}
|
https://restcountries.com/rest/v2/callingcode/{callingcode}
|
||||||
```
|
```
|
||||||
``` html
|
``` html
|
||||||
https://restcountries.eu/rest/v2/callingcode/372
|
https://restcountries.com/rest/v2/callingcode/372
|
||||||
```
|
```
|
||||||
|
|
||||||
## Region
|
## Region
|
||||||
@@ -120,10 +125,10 @@ https://restcountries.eu/rest/v2/callingcode/372
|
|||||||
Search by region: Africa, Americas, Asia, Europe, Oceania
|
Search by region: Africa, Americas, Asia, Europe, Oceania
|
||||||
|
|
||||||
``` javascript
|
``` javascript
|
||||||
https://restcountries.eu/rest/v2/region/{region}
|
https://restcountries.com/rest/v2/region/{region}
|
||||||
```
|
```
|
||||||
``` html
|
``` html
|
||||||
https://restcountries.eu/rest/v2/region/europe
|
https://restcountries.com/rest/v2/region/europe
|
||||||
```
|
```
|
||||||
|
|
||||||
## Regional Bloc
|
## Regional Bloc
|
||||||
@@ -145,16 +150,16 @@ Search by regional bloc:
|
|||||||
- SAARC (South Asian Association for Regional Cooperation)
|
- SAARC (South Asian Association for Regional Cooperation)
|
||||||
|
|
||||||
``` javascript
|
``` javascript
|
||||||
https://restcountries.eu/rest/v2/regionalbloc/{regionalbloc}
|
https://restcountries.com/rest/v2/regionalbloc/{regionalbloc}
|
||||||
```
|
```
|
||||||
``` html
|
``` html
|
||||||
https://restcountries.eu/rest/v2/regionalbloc/eu
|
https://restcountries.com/rest/v2/regionalbloc/eu
|
||||||
```
|
```
|
||||||
|
|
||||||
## Response Example
|
## Response Example
|
||||||
|
|
||||||
``` html
|
``` html
|
||||||
https://restcountries.eu/rest/v2/alpha/col
|
https://restcountries.com/rest/v2/alpha/col
|
||||||
```
|
```
|
||||||
|
|
||||||
``` json
|
``` json
|
||||||
@@ -197,7 +202,7 @@ https://restcountries.eu/rest/v2/alpha/col
|
|||||||
"br": "Colômbia",
|
"br": "Colômbia",
|
||||||
"pt": "Colômbia"
|
"pt": "Colômbia"
|
||||||
},
|
},
|
||||||
"flag": "https://restcountries.eu/data/col.svg",
|
"flag": "https://restcountries.com/data/col.svg",
|
||||||
"regionalBlocs": [{
|
"regionalBlocs": [{
|
||||||
"acronym": "PA",
|
"acronym": "PA",
|
||||||
"name": "Pacific Alliance",
|
"name": "Pacific Alliance",
|
||||||
@@ -217,20 +222,20 @@ https://restcountries.eu/rest/v2/alpha/col
|
|||||||
You can filter the output of your request to include only the specified fields.
|
You can filter the output of your request to include only the specified fields.
|
||||||
|
|
||||||
``` javascript
|
``` javascript
|
||||||
https://restcountries.eu/rest/v2/{service}?fields={field};{field};{field}
|
https://restcountries.com/rest/v2/{service}?fields={field};{field};{field}
|
||||||
```
|
```
|
||||||
``` html
|
``` html
|
||||||
https://restcountries.eu/rest/v2/all?fields=name;capital;currencies
|
https://restcountries.com/rest/v2/all?fields=name;capital;currencies
|
||||||
```
|
```
|
||||||
|
|
||||||
## Similar projects
|
## Similar projects
|
||||||
|
* [REST Countries] (original project)
|
||||||
* [Countries of the world]
|
* [Countries of the world]
|
||||||
* [REST Countries Node.js]
|
* [REST Countries Node.js]
|
||||||
* [REST Countries Ruby]
|
* [REST Countries Ruby]
|
||||||
* [REST Countries Go]
|
* [REST Countries Go]
|
||||||
* [REST Countries Python]
|
* [REST Countries Python]
|
||||||
* [world-currencies]
|
* [world-currencies]
|
||||||
* [REST Countries] (original project)
|
|
||||||
|
|
||||||
[world-currencies]: https://github.com/wiredmax/world-currencies
|
[world-currencies]: https://github.com/wiredmax/world-currencies
|
||||||
[REST Countries Node.js]: https://github.com/aredo/restcountries
|
[REST Countries Node.js]: https://github.com/aredo/restcountries
|
||||||
@@ -238,4 +243,4 @@ https://restcountries.eu/rest/v2/all?fields=name;capital;currencies
|
|||||||
[REST Countries Go]: https://github.com/alediaferia/gocountries
|
[REST Countries Go]: https://github.com/alediaferia/gocountries
|
||||||
[REST Countries Python]: https://github.com/SteinRobert/python-restcountries
|
[REST Countries Python]: https://github.com/SteinRobert/python-restcountries
|
||||||
[Countries of the world]: http://countries.petethompson.net
|
[Countries of the world]: http://countries.petethompson.net
|
||||||
[REST Countries]: https://github.com/apilayer/restcountries
|
[REST Countries]: https://github.com/apilayer/restcountries
|
||||||
|
|||||||
Reference in New Issue
Block a user