Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/geoffreylgv/worldcountryapi
World Countries API
https://github.com/geoffreylgv/worldcountryapi
api apirestfull collaborate devcycle github hacktoberfest java jetbrains learn microsoft mysql postgresql postman springboot student-vscode
Last synced: about 21 hours ago
JSON representation
World Countries API
- Host: GitHub
- URL: https://github.com/geoffreylgv/worldcountryapi
- Owner: geoffreylgv
- License: mit
- Created: 2023-03-11T19:09:37.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-08T11:19:17.000Z (over 1 year ago)
- Last Synced: 2024-04-16T14:24:07.632Z (9 months ago)
- Topics: api, apirestfull, collaborate, devcycle, github, hacktoberfest, java, jetbrains, learn, microsoft, mysql, postgresql, postman, springboot, student-vscode
- Language: Java
- Homepage:
- Size: 44.9 KB
- Stars: 12
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
## Open Source Programs
Pragrams are more than welcome
# WorldCountryAPI
About the project:
Tech Stack:
## Documentation
### Running principal route for the API
```bash
localhost:8090/country/api/v1
```**The API provides the following functionalities:**
##### Get a list of all countries:
` 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.
##### Get a specific country by ID:`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.
##### Get a list of countries by name:
`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.
##### Search for countries using any attribute:
`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
##### Demo video
[](https://www.youtube.com/watch?v=3M6ogLK_I-4 "Video on youtube, soon the API on Azure Functio APP")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.
## How to use locally
1. Download the repos,
2. make sure to update the application.propertie in the resources folder
3. make a clean and build and
4. run>Insert the country's data into the countries table; that's all. With love, thank you for reading. ^_^