Pragrams are more than welcome
About the project:
Tech Stack:
localhost:8090/country/api/v1
The API provides the following functionalities:
Request: GET /countries
Response: A JSON array containing all the countries in the system, with their respective ID, code, name (in French and English), alpha2 and alpha3 codes.
Request: GET /countries/{id}
Response: A JSON object containing the details of the country with the specified ID, including its code, name (in French and English), alpha2 and alpha3 codes.
Request: GET /countries?name={name}
Response: A JSON array containing all the countries whose name (in French or English) contains the specified search term, along with their respective ID, code, name (in French and English), alpha2 and alpha3 codes.
Request: GET /countries/search?q={query}
Response: A JSON array containing all the countries whose attribute contains the specified search term, their respective ID, code, name (in French and English), and alpha2 and alpha3 codes. The API is implemented using Spring Boot and utilizes the JPA/Hibernate framework for data persistence. The "Country" entity represents the data model, which is mapped to a database table called "COUNTRIES". The entity has the following attributes:
Full Changelog: https://github.com/geoffreylgv/API-world_countries/commits/v1.0.0
id: A unique identifier for each country.
code: A unique code assigned to each country.
nameFR: The name of the country in French.
nameEN: The name of the country in English.
alpha2: The two-letter code assigned to each country.
alpha3: The three-letter code assigned to each country.
The entity also includes standard JPA annotations for defining the mapping to the database table and managing the persistence of the entity instances. The Lombok library is used to generate getters, setters, equals and hashcode methods for the entity class.
- Download the repos,
- make sure to update the application.propertie in the resources folder
- make a clean and build and
- run
Insert the country's data into the countries table; that's all. With love, thank you for reading. ^_^