This project creates a simple district-based weather API using Spring Boot and MySQL, enabling CRUD operations. The API can be used to manage weather information for different districts.
The project is ready to run on Docker. Follow the steps below to get the project up and running.
- Clone the repository:
git clone https://github.com/augurcan/weatherAPI.git- Ensure Docker is installed.
- Open the terminal in the project root directory and run the following command:
docker-compose up -dOpen the terminal in the project root directory and run the following command:
docker-compose down- Spring Boot
- MySQL
- Docker
-
GET
- 'localhost:8080/api/v1/weather'
- 'localhost:8080/api/v1/weather/weatherId'
- 'localhost:8080/api/v1/weather/cities/cityId'
- 'localhost:8080/api/v1/weather/district/districtId'
- 'localhost:8080/api/v1/weather/cities/cityId/date'
- 'localhost:8080/api/v1/weather/district/districtId/date'
-
POST
- 'localhost:8080/api/v1/weather'
-
PUT
- 'localhost:8080/api/v1/weather/weatherId'
-
DELETE
- 'localhost:8080/api/v1/weather/weatherId'
-
WeatherDto:
{
"id":,
"districtId":"",
"cityId":"",
"date":"",
"hour":,
"name":"",
"temperature":,
"feltTemperature":,
"humidity":,
"windDirection":"",
"maxWind":,
"averageWind":
}