-
Notifications
You must be signed in to change notification settings - Fork 0
/
WeatherData.cs
65 lines (46 loc) · 1.85 KB
/
WeatherData.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
using System.Collections.Generic;
using System.Text.Json.Serialization;
// This class represents the weather data returned by the Open-Meteo API
public class WeatherData
{
[JsonPropertyName("hourly")]
public HourlyData? Hourly { get; set; }
}
public class HourlyData
{
[JsonPropertyName("temperature_2m")]
public List<float>? Temperature2M { get; set; }
[JsonPropertyName("wind_speed_10m")]
public List<float>? WindSpeed10M { get; set; }
[JsonPropertyName("weather_code")]
public List<int>? WeatherCode { get; set; }
[JsonPropertyName("uv_index")]
public List<float>? UVIndex { get; set; }
[JsonPropertyName("sunshine_duration")]
public List<float>? SunshineDuration { get; set; }
[JsonPropertyName("is_day")]
public List<int>? IsDay { get; set; }
[JsonPropertyName("visibility")]
public List<float>? Visibility { get; set; }
[JsonPropertyName("relative_humidity_2m")]
public List<float>? RelativeHumidity2M { get; set; }
[JsonPropertyName("apparent_temperature")]
public List<float>? ApparentTemperature { get; set; }
[JsonPropertyName("wind_gusts_10m")]
public List<float>? WindGusts10M { get; set; }
[JsonPropertyName("rain")]
public List<float>? Rain { get; set; }
[JsonPropertyName("showers")]
public List<float>? Showers { get; set; }
[JsonPropertyName("surface_pressure")]
public List<float>? SurfacePressure { get; set; }
[JsonPropertyName("cloud_cover")]
public List<float>? CloudCover { get; set; }
[JsonPropertyName("cloud_cover_low")]
public List<float>? CloudCoverLow { get; set; }
[JsonPropertyName("cloud_cover_mid")]
public List<float>? CloudCoverMid { get; set; }
[JsonPropertyName("cloud_cover_high")]
public List<float>? CloudCoverHigh { get; set; }
// Add other fields like snowfall, snow_depth if needed
}