ClimateLocator is an application that provides weather information based on location. It uses IP geolocation to determine the user's location and fetches weather data from the Weatherbit API.
Retrieves the user's location based on their IP address.
Fetches current weather information for the location.
Displays the temperature and weather description.
Before running the ClimateLocator application, ensure you have the following:
.NET Core SDK installed
Weatherbit API key
Geolocation API key
In a real solution, the user's IP address can be fetched using Request.HttpContext.Connection.RemoteIpAddress
. However, for the sake of simplicity and the ability to test a variety of IP addresses, this implementation of ClimateLocator uses the IP address as an argument for the controller.
Follow these steps to get started with ClimateLocator:
Clone the repository:
Run the application:
To run the tests for ClimateLocator, use the following command:
This application was developed by Rihards Dobelis.
Unit tests
WeatherController