Class WeatherForecast
The forecast tools (The Weather Channel)
Inheritance
object
WeatherForecast
Namespace: Nettify.Weather
Assembly: Nettify.dll
Syntax
public static class WeatherForecast
Methods
| Edit this page View SourceGetWeatherInfo(double, double, string, UnitMeasurement)
Gets current weather info from The Weather Channel
Declaration
public static WeatherForecastInfo GetWeatherInfo(double latitude, double longitude, string APIKey, UnitMeasurement Unit = UnitMeasurement.Metric)
Parameters
| Type | Name | Description |
|---|---|---|
| double | latitude | City latitude |
| double | longitude | City longitude |
| string | APIKey | API Key |
| UnitMeasurement | Unit | The preferred unit to use |
Returns
| Type | Description |
|---|---|
| WeatherForecastInfo | A class containing properties of weather information |
GetWeatherInfoAsync(double, double, string, UnitMeasurement)
Gets current weather info from The Weather Channel
Declaration
public static Task<WeatherForecastInfo> GetWeatherInfoAsync(double latitude, double longitude, string APIKey, UnitMeasurement Unit = UnitMeasurement.Metric)
Parameters
| Type | Name | Description |
|---|---|---|
| double | latitude | City latitude |
| double | longitude | City longitude |
| string | APIKey | API key |
| UnitMeasurement | Unit | The preferred unit to use |
Returns
| Type | Description |
|---|---|
| Task<WeatherForecastInfo> | A class containing properties of weather information |
ListAllCities(string, string)
Lists all the available cities
Declaration
public static Dictionary<string, (double, double)> ListAllCities(string city, string APIKey)
Parameters
| Type | Name | Description |
|---|---|---|
| string | city | |
| string | APIKey |
Returns
| Type | Description |
|---|---|
| Dictionary<string, (double, double)> |
ListAllCitiesAsync(string, string)
Lists all the available cities
Declaration
public static Task<Dictionary<string, (double, double)>> ListAllCitiesAsync(string city, string APIKey)
Parameters
| Type | Name | Description |
|---|---|---|
| string | city | |
| string | APIKey |
Returns
| Type | Description |
|---|---|
| Task<Dictionary<string, (double, double)>> |