Skip to content

EcossB/Countrys-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Countrys API 🧑‍💻

Countrys-API

This project is an API that provides information about countries, including details such as name, description, continent, flag, images, and more. 🧑‍💻

Basically, it's an API about countries that allows you to:

  • Query countries by name.
  • Query countries by continents.
  • Get information about famous places, hotels, flights, and gastronomy of the requested country.

Each REST method has security thanks to Spring Security, so to access each API method, you need to be authenticated and authorized through JWT.

What technologies did I use to create this project? 🧑‍💻

  • Java 17
  • SpringBoot
  • JPA
  • Lombok
  • Flyway
  • MySQL

As a dependency manager, I used Maven.

All these technologies were used to create this project, they are widely used technologies in the Spring Boot with Java ecosystem.

Prerequisites 🧑‍💻

To run this project, you need to have the following technologies installed on your machine:

  • Java SDK > 17
  • MySQL (> 8.0)
  • Insomnia to consume the API.

How to Run the Project on Your Machine?

  • The first thing you need to do is clone this repository.
  • You must create the "application.properties" file in the resource folder to add the connection string and thus be able to connect to the database.
  • Create an environment variable called JWT_SECRET so that you can create JWTs and authenticate users.

That's it! This is how you can have the project on your machine to run.

API References 🧑‍💻

Get all countries

 GET /paises
Type Description
string Devuelve un 200 con todos los paises listados.

Get countries by name

  GET /paises/pais/{nombre}
Parameter Type Description
nombre string Required. nombre del pais para hacer fetch

Get countries by continents

  GET /paises/continentes/{continente}
Parameter Type Description
continente string Required. nombre del continente para hacer fetch

🧑‍💻 Credits 🧑‍💻

Here are my different social medias where you can reach me:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages