owm-onecall-api
Version:
A wrapper for OpenWeatherMap's 'onecall' API.
29 lines (28 loc) • 1.03 kB
TypeScript
import { WeatherIcon } from "../types/response";
/**
* Represent the available weather icon codes available for DarkSky.
*
* Used as an interop between existing codebases that use DarkSky. However you really should stick to OpenWeatherMaps WeatherIcons, as you'll be able to access an icon.
*/
export declare enum DarkSkyWeatherIcon {
ClearDay = "clear-day",
ClearNight = "clear-night",
Rain = "rain",
Snow = "snow",
Sleet = "sleet",
Wind = "wind",
Fog = "fog",
Cloudy = "cloudy",
PartlyCloudyDay = "partly-cloudy-day",
PartlyCloudyNight = "partly-cloudy-night",
Thunderstorm = "thunderstorm"
}
/**
* Map an OpenWeatherMap icon id to a DarkSky Weather icon value.
*
* *Note:* There is not a direct 1:1 match, as DarkSky is missing some of the icons.
*
* @param icon OpenWeatherMap icon id
* @returns The equivelent icon id for DarkSky's API.
*/
export declare function mapToDarkSkyWeatherIcon(icon: WeatherIcon): DarkSkyWeatherIcon | undefined;