All Projects → amweiss → dark-sky-core

amweiss / dark-sky-core

Licence: MIT license
A .NET Standard Library for using the Dark Sky API.

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to dark-sky-core

Megaapiclient
MegaApiClient is a C# .Net library to access http://mega.co.nz / http://mega.nz cloud storage and file hosting service.
Stars: ✭ 151 (+174.55%)
Mutual labels:  nuget, netcore, netstandard
Zipstorer
A Pure C# Class to Store Files in Zip
Stars: ✭ 139 (+152.73%)
Mutual labels:  nuget, netcore, netstandard
Colore
A powerful C# library for Razer Chroma's SDK
Stars: ✭ 121 (+120%)
Mutual labels:  nuget, netcore, netstandard
Vs Validation
Common input and integrity validation routines for Visual Studio and other applications
Stars: ✭ 48 (-12.73%)
Mutual labels:  nuget, netstandard
Fo Dicom
Fellow Oak DICOM for .NET, .NET Core, Universal Windows, Android, iOS, Mono and Unity
Stars: ✭ 674 (+1125.45%)
Mutual labels:  nuget, netcore
Computesharp
A .NET 5 library to run C# code in parallel on the GPU through DX12 and dynamically generated HLSL compute shaders, with the goal of making GPU computing easy to use for all .NET developers! 🚀
Stars: ✭ 982 (+1685.45%)
Mutual labels:  nuget, netstandard
Vortice.windows
.NET standard bindings for DirectX, WIC, Direct2D1, XInput, XAudio and X3DAudio
Stars: ✭ 427 (+676.36%)
Mutual labels:  nuget, netstandard
Unitconversion
Expansible Unit Conversion Library for .Net Core and .Net Framework
Stars: ✭ 139 (+152.73%)
Mutual labels:  nuget, netcore
Wkhtmltopdf.netcore
Rotativa + Net Core
Stars: ✭ 137 (+149.09%)
Mutual labels:  nuget, netcore
Eventflow
Async/await first CQRS+ES and DDD framework for .NET
Stars: ✭ 1,932 (+3412.73%)
Mutual labels:  nuget, netstandard
Kendo.DynamicLinqCore
KendoNET.DynamicLinq implements server paging, filtering, sorting, grouping, and aggregating to Kendo UI via Dynamic Linq for .Net Core App(1.x ~ 3.x).
Stars: ✭ 36 (-34.55%)
Mutual labels:  netcore, netstandard
Mqttnet
MQTTnet is a high performance .NET library for MQTT based communication. It provides a MQTT client and a MQTT server (broker). The implementation is based on the documentation from http://mqtt.org/.
Stars: ✭ 2,486 (+4420%)
Mutual labels:  nuget, netcore
Xamarinmediamanager
Cross platform Xamarin plugin to play and control Audio and Video
Stars: ✭ 647 (+1076.36%)
Mutual labels:  nuget, netstandard
Vs Threading
The Microsoft.VisualStudio.Threading is a xplat library that provides many threading and synchronization primitives used in Visual Studio and other applications.
Stars: ✭ 585 (+963.64%)
Mutual labels:  nuget, netstandard
Opengl.net
Modern OpenGL bindings for C#.
Stars: ✭ 473 (+760%)
Mutual labels:  nuget, netstandard
SharpAudio
Audio playback/capturing engine for C#
Stars: ✭ 139 (+152.73%)
Mutual labels:  netcore, netstandard
H.NotifyIcon.WPF
NotifyIcon for .Net Core 3.1 and .Net 5 WPF.
Stars: ✭ 44 (-20%)
Mutual labels:  nuget, netcore
Bcrypt.net
BCrypt.Net - Bringing updates to the original bcrypt package
Stars: ✭ 422 (+667.27%)
Mutual labels:  nuget, netcore
Ether.network
https://github.com/Eastrall/Sylver
Stars: ✭ 147 (+167.27%)
Mutual labels:  nuget, netstandard
Pluginframework
Everything is a Plugin in .NET
Stars: ✭ 197 (+258.18%)
Mutual labels:  nuget, netcore

ARCHIVED: Apple has purchased Dark Sky and is shutting down the API, so I'm no longer supporting this.

Dark Sky Core

NuGet Build Status codecov

A .NET Standard Library for using the Dark Sky API.

Usage

The main class is DarkSkyService. When using it you will need provide your API key after signing up for a dev account. You can also provide an implementations of IHttpClient and IJsonSerializerService if you want to replace the default ZipHttpClient and JsonNetJsonSerializerService for testing or other purposes.

Once you have an instance of the class, use GetForecast to use the API. The method by default is a forecast request. If you specify a value for ForecastDateTime in an OptionalParameters instance it will become a time machine request.

The responses all take the form of a CamelCase version of the Dark Sky Response in DarkSkyResponse. This includes the headers and properties for the required text and link to use based on the Terms of Service.

var darkSky = new DarkSky.Services.DarkSkyService(apiKey);
var forecast = await darkSky.GetForecast(42.915, -78.741);

if (forecast?.IsSuccessStatus == true)
{
    Console.WriteLine(forecast.Response.Currently.Summary);
}
else
{
    Console.WriteLine("No current weather data");
}
Console.WriteLine(forecast.AttributionLine);
Console.WriteLine(forecast.DataSource);

You can see more examples of usage in the integration tests.

Additional Information

Code of Conduct and Contributing Guidelines for the project.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].