Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "weather"

Fetch current weather conditions from Environment Canada for a given city and province. The supported cities for each province can also be retrieved.

Example

For fetching the supported cities in Alberta:

let cities = await WeatherCalculator.getCitiesPromise(Province.ALBERTA);

For fetching the current weather for a location:

let calculator = new WeatherCalculator();
calculator.province = "AB";
calculator.city = "Calgary";
await calculator.fetchWeatherPromise();
//********* the calculator will now contain current weather values ***********

Index