An easy-to-use library for getting weather data from Open-Meteo
var client = new OpenMeteoClient();
var current = await client.GetCurrentWeather(52.5,13.4);
Console.WriteLine(current?.WeatherCode);
var daily = await client.GetDailyForecasts(52.5, 13.4);
Console.WriteLine(daily?[0].WeatherCode);
var hourly = await client.GetHourlyForecasts(52.5, 13.4);
Console.WriteLine(hourly?[0].WeatherCode);
var client = new OpenMeteoClient();
var data = await client.GetWeatherForecastData(52.5, 13.4,
currentVariables: CurrentVariables.All, dailyVariables: DailyVariables.All, hourlyVariables: HourlyVariables.All);
Console.WriteLine(data?.CurrentWeather?.WeatherCode);
Console.WriteLine(data?.DailyForecast?.WeatherCode?[0]);//Array
Console.WriteLine(data?.HourlyForecast?.WeatherCode?[0]);//Array
var client = new OpenMeteoClient();
var current = await client.GetHourlyAirQuality(52.5, 13.4);
Console.WriteLine(current[0].Pm25);
var client = new OpenMeteoClient
{
ForecastApiBase = "https://customer-api.open-meteo.com",
ForecastParameters =
{
{ "apikey","YOUR_KEY" }
}
};