This project we are consuming Open Weather API for future forecast. In this app we are using Spring boot, RestTemplate, Junit and Mockito.
Deployed this application on heroku server, endpoint is available on:
If running on local machine then endpoint is available on:
- Java
- Spring Boot
- Maven
- Lombok
- Open Weather API
- [Open API Swagger Documentation]
- Eclipse or IntelliJ IDEA (or any preferred IDE) with embedded Gradle
- Maven (version >= 3.6.0)
- Postman (or any RESTful API testing tool)
- Any browser
-
GET Mapping http:https://localhost:8080/10001 - Get weather forecast for 10001 zipcode
Output::
{ "cityName": "New York", "country": "US", "zipcode": 10001, "tomorrowsForecast": { "2020-11-13 21:00:00": 286.19, "2020-11-13 12:00:00": 284.32, "2020-11-13 18:00:00": 285.22, "2020-11-13 06:00:00": 284.29, "2020-11-13 03:00:00": 284.68, "2020-11-13 09:00:00": 284.31, "2020-11-13 00:00:00": 284.63, "2020-11-13 15:00:00": 285.61 } }