https://github.com/lukasveiga/weather-forecast
Weather Forecast API with Java + Spring
https://github.com/lukasveiga/weather-forecast
java openfeign redis spring spring-boot
Last synced: about 2 months ago
JSON representation
Weather Forecast API with Java + Spring
- Host: GitHub
- URL: https://github.com/lukasveiga/weather-forecast
- Owner: Lukasveiga
- License: mit
- Created: 2024-07-17T02:04:58.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-18T15:26:37.000Z (almost 2 years ago)
- Last Synced: 2025-10-10T04:05:16.638Z (9 months ago)
- Topics: java, openfeign, redis, spring, spring-boot
- Language: Java
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Weather Forecast Spring API
### Overview
The Weather Forecast API allows users to retrieve weather forecasts based on their CEP (Postal Code) location. The API uses OpenFeign to integrate with external services to convert CEP to latitude and longitude, and then to fetch weather data using these coordinates.
## Technologies
- Spring Boot
- OpenFeign
## Endpoint
Request:
* Method: GET
* Url: http://localhost:8080/api/v1/weather-forecast/{cep}?forecast_days=1
* Path param: `cep` (String): The CEP (Postal Code) for which to retrieve the weather forecast.
* Query param: `forecast_days` (Integer): Forecasts days.
## External APIs
### CEP to Latitude/Longitude API
- Base URL: https://cep.awesomeapi.com.br/json
- Method: GET
- Query Parameter:
- cep (String): The CEP for which to retrieve data includin coordinates.
### Weather Data API
- Base URL: https://api.open-meteo.com/v1/forecast
- Method: GET
- Query Parameters:
- latitude (Double): The latitude coordinate.
- longitude (Double): The longitude coordinate.
- current: A list of weather variables to get current conditions.
- forecast_days: Per default, only 7 days are returned. Up to 16 days of forecast are possible.
- And others. See documentation: https://open-meteo.com/en/docs