This Weather Application is a simple yet effective console application that retrieves the current temperature in fahrenheit for a specified city using the OpenWeatherMap API. Developed using .NET Core and C#, the application demonstrates my skills in API integration, data manipulation, and working with external libraries.
- City-Based Weather Information: Enter the name of a city, and the application fetches and displays the current weather details.
- OpenWeatherMap API Integration: Utilizes the OpenWeatherMap API to gather real-time weather data.
- Data Parsing with Newtonsoft.Json: Leverages the Newtonsoft.Json NuGet package for seamless parsing of JSON responses from the API.
- .NET Core: The application is built on the .NET Core framework, ensuring platform independence and scalability.
- C#: The primary programming language used for application logic and implementation.
- Newtonsoft.Json NuGet Package: Employed for efficient handling of JSON data.
-
Clone the Repository:
git clone https://github.com/yourusername/weather-application.git
-
Open in Visual Studio:
- Open the solution file (
WeatherApplication.sln
) in Visual Studio.
- Open the solution file (
-
Install Dependencies:
- If not automatically installed, ensure that the Newtonsoft.Json NuGet package is added.
-
API Key Configuration:
- Sign up on OpenWeatherMap to obtain an API key.
- Replace
YOUR_API_KEY
in theWeatherService.cs
file with your actual API key.
-
Run the Application:
- Build and run the application in Visual Studio.
-
Enter City Name:
- Follow the on-screen instructions to input the desired city.
Ensure that you keep your API key confidential. Consider using environment variables or a configuration manager to securely manage API keys in production.
- OpenWeatherMap API Documentation: OpenWeatherMap API
- Special thanks to OpenWeatherMap for providing the weather data through their API.
This project is licensed under the MIT License - see the LICENSE file for details.