Class CurrentWeather
- Namespace
- SimpleWeather
- Assembly
- SimpleWeather.dll
An object that provides current weather data
public class CurrentWeather
- Inheritance
-
CurrentWeather
- Inherited Members
Constructors
CurrentWeather(string)
Initializes a new instance of the CurrentWeather class from a JSON response.
public CurrentWeather(string jsonResponse)
Parameters
jsonResponsestringThe raw JSON returned by the weather API.
Properties
Base
Gets the OpenWeather base station identifier.
public string? Base { get; }
Property Value
- string
The OpenWeather base station identifier.
City
Gets the city name associated with the reading.
public string? City { get; }
Property Value
- string
The city name associated with the reading.
CityID
Gets the city identifier assigned by OpenWeather.
public int? CityID { get; }
Property Value
- int?
The city identifier assigned by OpenWeather.
Clouds
Gets the cloud coverage information.
public Clouds? Clouds { get; }
Property Value
- Clouds
The cloud coverage information.
Coordinates
Gets the coordinates associated with the weather reading.
public LatLong Coordinates { get; }
Property Value
- LatLong
The coordinates associated with the weather reading.
Main
Gets the temperature and pressure readings.
public Main? Main { get; }
Property Value
- Main
The temperature and pressure readings.
Rain
Gets the rainfall totals.
public Rain? Rain { get; }
Property Value
- Rain
The rainfall totals.
Snow
Gets the snowfall totals.
public Snow? Snow { get; }
Property Value
- Snow
The snowfall totals.
StatusCode
Gets the HTTP-like status code when an error occurs.
public int? StatusCode { get; }
Property Value
- int?
The HTTP-like status code when an error occurs.
Sys
Gets the system metadata values.
public Sys? Sys { get; }
Property Value
- Sys
The system metadata values.
Timezone
Gets the timezone name returned by the API.
public string? Timezone { get; }
Property Value
- string
The timezone name returned by the API.
TimezoneOffset
UTC (+/-) hour/s
public int? TimezoneOffset { get; }
Property Value
- int?
UTC (+/-) hour/s
Visibility
Gets the visibility distance in meters when available.
public double? Visibility { get; }
Property Value
- double?
The visibility distance in meters when available.
Weather
Gets the collection of high-level weather descriptors.
public Weather? Weather { get; }
Property Value
- Weather
The collection of high-level weather descriptors.
Wind
Gets the wind data for the reading.
public Wind? Wind { get; }
Property Value
- Wind
The wind data for the reading.