Add support for DarkSky API

This commit is contained in:
Matthew Oslan
2019-05-13 15:14:06 -04:00
parent ee31e736ba
commit 16e913caf3
3 changed files with 96 additions and 1 deletions

View File

@@ -17,22 +17,34 @@ export interface WeatherData {
temp: number;
/** The current humidity (as a percentage). */
humidity: number;
/** The current wind speed (in miles per hour). */
wind: number;
/** A human-readable description of the weather. */
description: string;
/** An icon ID that represents the current weather. This will be used in http://openweathermap.org/img/w/<ICON_ID>.png */
icon: string;
region: string;
city: string;
/** The forecasted minimum temperature for the current day (in Fahrenheit). */
minTemp: number;
/** The forecasted minimum temperature for the current day (in Fahrenheit). */
maxTemp: number;
/** The forecasted total precipitation for the current day (in inches). */
precip: number;
forecast: WeatherDataForecast[]
}
/** The forecasted weather for a specific day in the future. */
export interface WeatherDataForecast {
/** The forecasted minimum temperature for this day (in Fahrenheit). */
temp_min: number;
/** The forecasted maximum temperature for this day (in Fahrenheit). */
temp_max: number;
/** The timestamp of the day this forecast is for (in Unix epoch seconds). */
date: number;
/** An icon ID that represents the weather at this forecast window. This will be used in http://openweathermap.org/img/w/<ICON_ID>.png */
icon: string;
/** A human-readable description of the weather. */
description: string;
}