OpenSky.Core 1.0.1

dotnet add package OpenSky.Core --version 1.0.1                
NuGet\Install-Package OpenSky.Core -Version 1.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="OpenSky.Core" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add OpenSky.Core --version 1.0.1                
#r "nuget: OpenSky.Core, 1.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 OpenSky.Core as a Cake Addin
#addin nuget:?package=OpenSky.Core&version=1.0.1

// Install OpenSky.Core as a Cake Tool
#tool nuget:?package=OpenSky.Core&version=1.0.1                

OpenSky.Core

OpenSky.Core is a comprehensive .NET library designed for seamless interaction with the WeatherAPI.com APIs. This library wraps the WeatherAPI functionalities in C#, providing developers with an intuitive and efficient way to integrate weather data into their applications.

Key Features

  • WeatherAPI Integration: Leverages the powerful APIs provided by WeatherAPI.com for accessing a wide range of weather data.
  • Strong Typing: Ensures robust type safety, minimizing runtime errors and enhancing code reliability.
  • Flexible Response Formats: Supports both XML and JSON response formats, allowing developers to choose the most suitable format for their needs.
  • Error Handling: Implements comprehensive error handling mechanisms, ensuring that developers can effectively manage and respond to any issues that arise during API interactions.

This project is an excellent tool for developers looking to integrate weather data into their applications with ease and reliability.

Installation

Nuget Package

.NET CLI:

  dotnet add package OpenSky.Core --version 1.0.0 

Package Manager

  Install-Package OpenSky.Core -Version 1.0.0

Example Usage

Here is an example of how to use the OpenSkyService to search for a location. This example demonstrates how to configure the service and make a request to search for a location.

using OpenSky.Core.Configuration;
using OpenSky.Core.Service;

// Create the configuration settings with the API key
var ossConfig = new OssConfiguration { ApiKey = "your-api-key" };

// Create the HttpClient instance
var httpClient = new HttpClient();

// Create the OpenSkyService instance with the HttpClient and configuration settings
var ossService = new OpenSkyService(httpClient, ossConfig);

// Make a request to search for a location
// You can get the return value as strong type, json or xml if you wish.
var result = await ossService.SearchAsync("Ista");
//var jsonResult = await ossService.SearchJsonAsync("Ista");
//var xmlResult = await ossService.SearchXmlAsync("Ista");

// Handle the response (example)
if (result.IsSuccess)
{
    var searchResults = result.Response;
    // Process search results
}
else
{
    Console.WriteLine($"Error: {result.Error.Message}");
}

License

This project is licensed under the GPL-3.0 License - see the LICENSE file for details.

Contributions

Contributions are welcome! Please fork this repository and submit a pull request with your changes. For major changes, please open an issue first to discuss what you would like to change.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on OpenSky.Core:

Package Downloads
OpenSky.AspNetCore

OpenSky.AspNetCore is an extension library for ASP.NET Core that simplifies the integration of the `OpenSkyService` into ASP.NET Core applications. It provides extension methods for `IServiceCollection` to easily configure and add the `OpenSkyService` with dependency injection, allowing developers to seamlessly access weather data from WeatherAPI.com in their ASP.NET Core projects.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 101 12/21/2024
1.0.0 86 12/21/2024