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», pointForecastOptions?, options?): Promise<HttpPayload<MeteogramDataPayload>>

Gets enhanced point forecast meteogram data for given location

Type parameters

NameType
Textends LatLonStep

Parameters

NameType
model"drought" | "radar" | "satellite" | "capAlerts" | "gfs" | "ecmwf" | "ecmwfAnalysis" | "ecmwfAifs" | "ecmwfWaves" | "gfsWaves" | "icon" | "iconWaves" | "cams" | "efi" | "cmems" | "fireDanger" | "activeFires" | "nems" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "camsEu" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue"
«destructured»T
pointForecastOptions?Record<string, string>
options?HttpOptions

Returns

Promise<HttpPayload<MeteogramDataPayload>>

Promise with HTTP payload


getPointForecastData

getPointForecastData<T>(model, params, pointForecastOptions?, httpOptions?): 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" | "ecmwfAifs" | "ecmwfWaves" | "gfsWaves" | "icon" | "iconWaves" | "cams" | "efi" | "cmems" | "fireDanger" | "activeFires" | "nems" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "camsEu" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue"Forecast model
paramsTLalLon of the location and additional parameters
pointForecastOptions?Record<string, string>Additional options of point forecast API
httpOptions?HttpOptionsAdditional HTTP options

Returns

Promise<HttpPayload<WeatherDataPayload<DataHash>>>

Promise with HTTP payload