🖥️How to use
How do you use it?
Using this library is very simple! Just use the ManagedWeatherMap
namespace in any piece of code you want to use the library, as in: using ManagedWeatherMap;
Just use the Forecast
class that contains:
GetWeatherInfo(long, string, UnitMeasurement)
GetWeatherInfo(string, string, UnitMeasurement)
ListAllCities()
The first three functions download the weather information for either the specified city ID or city name and return the relevant weather information, ForecastInfo
, that contains these properties:
long CityID
string CityName
WeatherCondition Weather
UnitMeasurement TemperatureMeasurement
(see weather conditions)double Temperature
double FeelsLike
double Pressure
double Humidity
double WindSpeed
double WindDirection
where the UnitMeasurement
is:
Kelvin
Measurement for
Temperature
andFeelsLike
isK
(Kelvin)Measurement for
WindSpeed
ism.s
(Meters per second)Measurement for
Pressure
ishPa
(Hectopascal)
Metric
Measurement for
Temperature
andFeelsLike
isC
(Celsius)Measurement for
WindSpeed
ism.s
(Meters per second)Measurement for
Pressure
ishPa
(Hectopascal)
Imperial
Measurement for
Temperature
andFeelsLike
isF
(Fahrenheit)Measurement for
WindSpeed
ismph
(Miles per hour)Measurement for
Pressure
ishPa
(Hectopascal)
You're required to provide the API key for each weather operation, which you can get by visiting this page.
Asynchronous Operation
For web development and other cases where asynchronous development is appropriate, you can use the below functions which are declared to be asynchronous:
Last updated