UNPKG

@eggtronic/react-weather-widget

Version:
15 lines (14 loc) 659 B
import { OpenWeatherMapExclude, WeatherData } from '../types/weatherWidget'; /** * * @param key api key from openweathermap * @param units * For temperature in Fahrenheit, use units=imperial * For temperature in Celsius, use units=metric * Kelvin is used by default, so there is no need to use the units parameter in the API call if you want this * @param exclude https://openweathermap.org/api/one-call-api */ export default function useFetchWeather(key: string, units?: string, exclude?: OpenWeatherMapExclude, geo?: { lat: string; lon: string; } | undefined): (string | WeatherData | null | undefined)[];