New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ImgwApi

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ImgwApi

Client for IMGW API.

Source
nugetNuGet
Version
1.0.0
Version published
Maintainers
1
Created
Source

NuGet version (ImgwApi)

ImgwApi

.NET API client for IMGW (Instytut Meteorologii i Gospodarki Wodnej) API. This is not an official package nor is it endorsed by IMGW in any way.

Usage Restrictions

Usage

var client = SynopClient.Create();

//call IMGW weather api at https://danepubliczne.imgw.pl/api/data/synop/
var result = await client.GetAllAsync();

var avgTemp = result.Select(x => x.TemperatureC).Average();

//read for single station
var resultForWarsaw = await client.GetAsync(SynopStations.Warszawa);

//create Api Client with external HttpClient
var client = SynopClient.Create(new HttpClient());

//register in DI - there are no public constuctors in SynopClient, only factory methods
services.AddSingleton<ISynopClient>(serviceProvider => SynopClient.Create())

//create hydro client
var hydroClient = HydroClient.Create();

//call IMGW hydro api at https://danepubliczne.imgw.pl/api/data/hydro/
var result = await hydroClient.GetAllAsync();

License

This package (but not the data, see Usage Restrictions above) comes with the MIT license.

Keywords

imgw

FAQs

Package last updated on 26 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts