You've already forked restcountries
mirror of
https://gitlab.com/restcountries/restcountries.git
synced 2026-04-05 12:32:54 +01:00
Adding the Car node to the Java code
This commit is contained in:
@@ -25,6 +25,9 @@ You can check the [FIELDS.md](FIELDS.md) file to get a description for each fiel
|
||||
# Changelog
|
||||
### General
|
||||
- Netherlands' population fixed
|
||||
- Added `fifa` codes
|
||||
- Added country's driving side
|
||||
- Added country Distinguishing (oval) sign
|
||||
### V3
|
||||
- Added population
|
||||
### V3.1
|
||||
@@ -44,7 +47,15 @@ Currently there are 3 versions:
|
||||
"png": "https://restcountries.com/data/png/per.png"
|
||||
}
|
||||
```
|
||||
## Using this Project
|
||||
|
||||
- [Famosos](https://famosos.com)
|
||||
- [Cultural Care](https://www.culturalcare.world/)
|
||||
- [Covidata](https://worldcovidata.com/)
|
||||
- [Asendia](https://tracking.asendia.com)
|
||||
- [Picker](https://mwb.pickerexpress.com/#/login)
|
||||
|
||||
#Endpoints
|
||||
Below are described the REST endpoints available that you can use to search for countries
|
||||
|
||||
## All
|
||||
@@ -394,9 +405,6 @@ https://restcountries.com/v2/{service}?fields={field},{field},{field}
|
||||
``` html
|
||||
https://restcountries.com/v2/all?fields=name,capital,currencies
|
||||
```
|
||||
## Using this Project
|
||||
|
||||
- [Nations24](https://nations24.com)
|
||||
|
||||
## Similar projects
|
||||
* [REST Countries] (original project)
|
||||
|
||||
@@ -32,6 +32,7 @@ public class ControllerHelper {
|
||||
"maps",
|
||||
"population",
|
||||
"gini",
|
||||
"fifa"
|
||||
"fifa",
|
||||
"car"
|
||||
};
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ public class BaseCountry {
|
||||
private Integer population;
|
||||
private Map<String, Double> gini;
|
||||
private String fifa;
|
||||
private Car car;
|
||||
|
||||
public Name getName() {
|
||||
return name;
|
||||
@@ -286,4 +287,12 @@ public class BaseCountry {
|
||||
public void setFifa(String fifa) {
|
||||
this.fifa = fifa;
|
||||
}
|
||||
|
||||
public Car getCar() {
|
||||
return car;
|
||||
}
|
||||
|
||||
public void setCar(Car car) {
|
||||
this.car = car;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package dev.amatos.restcountries.domain.base;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class Car {
|
||||
private List<String> signs;
|
||||
private String side;
|
||||
|
||||
public List<String> getSigns() {
|
||||
return signs;
|
||||
}
|
||||
|
||||
public void setSigns(List<String> signs) {
|
||||
this.signs = signs;
|
||||
}
|
||||
|
||||
public String getSide() {
|
||||
return side;
|
||||
}
|
||||
|
||||
public void setSide(String side) {
|
||||
this.side = side;
|
||||
}
|
||||
}
|
||||
@@ -169,7 +169,7 @@
|
||||
"gini": {},
|
||||
"car": {
|
||||
"signs": [],
|
||||
"side": ""
|
||||
"side": "right"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
+1577
-83
File diff suppressed because it is too large
Load Diff
@@ -7,17 +7,24 @@ Get information about countries via a RESTful API
|
||||
|
||||
New in Version 3
|
||||
-
|
||||
Version 3 uses [this] project to get the country's structure and adds a couple of new features:
|
||||
Version 3 and 3.1 uses [this] project to get the country's structure and adds a couple of new features:
|
||||
|
||||
- Search by translations
|
||||
- Search by language's name (not just language code)
|
||||
- Search by currency's name (not just currency code)
|
||||
- Turning back from V2 to V3: continent to region and region to subregion
|
||||
- Population
|
||||
- Fifa code
|
||||
- Added country's driving side
|
||||
- Added country Distinguishing (oval) sign
|
||||
|
||||
In addition to those features, I added the flags (svg and png) to each country.
|
||||
|
||||
In version 3 you get:
|
||||
V3 vs V3.1
|
||||
-
|
||||
The only difference between v3 and v3.1 is
|
||||
|
||||
V3:
|
||||
|
||||
```json
|
||||
"flags": [
|
||||
@@ -25,7 +32,7 @@ In version 3 you get:
|
||||
"https://restcountries.com/data/png/per.png"
|
||||
]
|
||||
```
|
||||
In version 3.1 you get:
|
||||
V3.1:
|
||||
|
||||
```json
|
||||
"flags": {
|
||||
@@ -40,7 +47,7 @@ The structure has been reverted to its original form from the [Original Project]
|
||||
|
||||
Donate!
|
||||
---------------
|
||||
We're getting about 1.6 millions hits each day and that means also bandwidth (24 GB per day!) so
|
||||
We're getting about 1.6 millions hits each day and that means also bandwidth (25 GB per day!) so
|
||||
costs have obviously increased. **Please**, consider making a [donation] to help me pay the server's
|
||||
bills, you're welcome to [donate] or you can also
|
||||
[buy me a coffee](https://www.buymeacoffee.com/amatos).
|
||||
@@ -52,6 +59,8 @@ This project is used by
|
||||
- [Famosos](https://famosos.com)
|
||||
- [Cultural Care](https://www.culturalcare.world/)
|
||||
- [Covidata](https://worldcovidata.com/)
|
||||
- [Asendia](https://tracking.asendia.com)
|
||||
- [Picker](https://mwb.pickerexpress.com/#/login)
|
||||
|
||||
Original RESTCountries project has over 1200 users, including:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user