Skip to content

@windy/fetch

Basic HTTP requests for getting URLs of our backend services or fetching data from Windy API. Although it works as wrapper around our http module, it ensures standardized way of fetching data.

Table of contents

Functions

Functions

getMeteogramForecastData

getMeteogramForecastData<T>(model, «destructured», options?): Promise<HttpPayload<MeteogramDataPayload>>

Gets enhanced point forecast meteogram data for given location

Type parameters

NameType
Textends LatLonStep

Parameters

NameTypeDescription
model"drought" | "radar" | "satellite" | "capAlerts" | "gfs" | "ecmwf" | "ecmwfAnalysis" | "ecmwfWaves" | "gfsWaves" | "icon" | "iconWaves" | "cams" | "efi" | "cmems" | "fireDanger" | "activeFires" | "nems" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "camsEu" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "mblue"Forecast model
«destructured»T-
options?HttpOptionsAdditional HTTP options

Returns

Promise<HttpPayload<MeteogramDataPayload>>

Promise with HTTP payload


getPointForecastData

getPointForecastData<T>(model, params, source, qs?, options?): Promise<HttpPayload<WeatherDataPayload<DataHash>>>

Gets point forecast data for given location

Type parameters

NameType
Textends LatLonStep

Parameters

NameTypeDescription
model"drought" | "radar" | "satellite" | "capAlerts" | "gfs" | "ecmwf" | "ecmwfAnalysis" | "ecmwfWaves" | "gfsWaves" | "icon" | "iconWaves" | "cams" | "efi" | "cmems" | "fireDanger" | "activeFires" | "nems" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "camsEu" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "mblue"Forecast model
paramsTLalLon of the location and additional parameters
sourcestringWho is the initiator of this request (name of you plugin)
qs?stringAdditional query string
options?HttpOptionsAdditional HTTP options

Returns

Promise<HttpPayload<WeatherDataPayload<DataHash>>>

Promise with HTTP payload