izolabella.OpenWeatherMap.NET 4.0.1

dotnet add package izolabella.OpenWeatherMap.NET --version 4.0.1
NuGet\Install-Package izolabella.OpenWeatherMap.NET -Version 4.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="izolabella.OpenWeatherMap.NET" Version="4.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add izolabella.OpenWeatherMap.NET --version 4.0.1
#r "nuget: izolabella.OpenWeatherMap.NET, 4.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install izolabella.OpenWeatherMap.NET as a Cake Addin
#addin nuget:?package=izolabella.OpenWeatherMap.NET&version=4.0.1

// Install izolabella.OpenWeatherMap.NET as a Cake Tool
#tool nuget:?package=izolabella.OpenWeatherMap.NET&version=4.0.1

🌦️ izolabella.OpenWeatherMap.NET

A library for communicating with the OpenWeatherMap API.

Used mostly because I like to know when it rains and enjoy having the convenience of seeing the weather in places other than a dedicated app.

👩‍💻 Getting Started

This project is available through NuGet.org;

  • Package Manager (Visual Studio)
Install-Package izolabella.OpenWeatherMap.NET
  • .NET CLI
dotnet add package izolabella.OpenWeatherMap.NET

⌨️ Code

A new instance of the OpenWeatherMapClient class must be initialized. This can be done while providing the AppId argument in the constructor immediately or the AppId can be set later, but if it isn't set before you attempt calling a method, the client will throw an Exception. This class also supports a specific unit type.

OpenWeatherMapClient Client = new("App Id", UnitTypes.Metric);

Various methods of communicating with the API are provided through processors used for different parts of the API.

. . .
WeatherResponse? Response = await Client.Processors.CurrentWeatherDataProcessor.GetWeatherByZipCodeAsync("00000", "US");
// WeatherResponse is a class containing generic, current weather information.
. . .

. . .
OneCallWeatherResponse? OneCallWeatherResponse = await Client.Processors.OneCallProcessor.CallAsync(0.0m, 0.0m);
// OneCallWeatherResponse is a class containing all possible relevant weather information regarding the given coordinates.
. . .

The WeatherResponse object might not always be null if an error has occurred (such as an invalid zipcode), check the Cod object for a 2xx http status code if necessary. Specific error types will more than likely be added later.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
4.0.1 461 3/29/2022
4.0.0 381 3/29/2022
3.0.1 437 3/18/2022
3.0.0 374 3/18/2022
2.1.0 397 3/17/2022
2.0.0 370 3/11/2022
1.3.0 381 3/9/2022
1.2.4 367 3/9/2022
1.2.3 402 3/7/2022
1.2.2 393 3/7/2022
1.2.1 374 3/7/2022
1.2.0 361 3/7/2022
1.1.0 369 3/7/2022
1.0.2 404 3/6/2022
1.0.1 401 3/6/2022
1.0.0 438 3/6/2022
0.1.0 412 3/6/2022

Fixed JSON errors, fixed unit type not actually sending the current units.