Table of Contents

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

jsonResponse string

The raw JSON returned by the weather API.

Properties

Base

Gets the OpenWeather base station identifier.

public string? Base { get; }

Property Value

string

City

Gets the city name associated with the reading.

public string? City { get; }

Property Value

string

CityID

Gets the city identifier assigned by OpenWeather.

public int? CityID { get; }

Property Value

int?

Clouds

Gets the cloud coverage information.

public Clouds? Clouds { get; }

Property Value

Clouds

Coordinates

Gets the coordinates associated with the weather reading.

public LatLong Coordinates { get; }

Property Value

LatLong

Main

Gets the temperature and pressure readings.

public Main? Main { get; }

Property Value

Main

Rain

Gets the rainfall totals.

public Rain? Rain { get; }

Property Value

Rain

Snow

Gets the snowfall totals.

public Snow? Snow { get; }

Property Value

Snow

StatusCode

Gets the HTTP-like status code when an error occurs.

public int? StatusCode { get; }

Property Value

int?

Sys

Gets the system metadata values.

public Sys? Sys { get; }

Property Value

Sys

Timezone

Gets the timezone name returned by the API.

public string? Timezone { get; }

Property Value

string

TimezoneOffset

UTC (+/-) hour/s

public int? TimezoneOffset { get; }

Property Value

int?

Visibility

Gets the visibility distance in meters when available.

public double? Visibility { get; }

Property Value

double?

Weather

Gets the collection of high-level weather descriptors.

public Weather? Weather { get; }

Property Value

Weather

Wind

Gets the wind data for the reading.

public Wind? Wind { get; }

Property Value

Wind