Skip to content

Repository files navigation

ContributorsForksStargazersIssuesMIT LicenseLinkedInTwitterGitHub

OpenWeatherMap API Wrapper Library (C#)

Overview

The most complete and modern library written for the OpenWeather API in .Net. This library retrieves the JSON from the OpenWeatherMap API and serializes them into objects. All of the free textual APIs are supported. We have planned support for the paid and mapping APIs, also. See the roadmap for more information.

Clients

  • AirPollutionClient - Current and historical pollution conditions. See OpenWeather API Doc for more information.
  • CurrentWeatherClient - Current weather conditions. See OpenWeather API Doc for more information.
  • FiveDayForecastClient - Up to five days of three-hour forecasts. See OpenWeather API Doc for more information.
  • GeocodingClient - Full support for geocoding by location name, post/zip code, and reverse geocoding. See OpenWeather API Doc for more information.

Installing

Install the NuGet package https://www.nuget.org/packages/CoderPro.OpenWeatherMap.Wrapper/

.NET CLI

dotnet add package CoderPro.OpenWeatherMap.Wrapper

Package Manager

Install-Package CoderPro.OpenWeatherMap.Wrapper

Example Usage

varopenWeatherClient=newCoderPro.OpenWeatherMap.Wrapper.CurrentWeatherClient("my open weather API key");// Use async version wherever possible.varquery=awaitopenWeatherAPI.QueryAsync("city/location");// or non-async version if needed for legacy codevarquery=openWeatherAPI.Query("city/location");Console.WriteLine($"The temperature in {query.Name}, {query.Sys.Country} is currently {query.Main.Temperature.FahrenheitCurrent} °F");

Demo Applications

A demo .Net 6 Windows Presentation Framework (WPF) application is bundled in this repo. View here

Roadmap

FeatureVersionRelease Date
All free textual APIs0.5.02023/06/08
Demo WPF App1.0.02023/06/17
Weather Triggers API1.1.02023/07/08
One Call API 32.0.02023/08/08
Weather Maps 1.0 API2.1.02023/09/08
Weather station API2.2.02023/10/08

Change Log

  • 2023/06/17
    • Initial commit

About

The most complete and modern library written in .Net for the OpenWeatherMap API.This library retrieves the JSON from the ZPIs and serializes them into objects. All of the free textual APIs are supported. We have planned support for the paid and mapping APIs also.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages