@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
- getHurricanesCount
- getMeteogramForecastData
- getMeteogramForecastUrl
- getObservationPoiUrl
- getPointForecastData
- getPointForecastUrl
Functions
getHurricanesCount
▸ getHurricanesCount(): Promise
<HttpPayload
<ActiveStormCountPayload
>>
Returns http promise for active hurricanes count
Returns
Promise
<HttpPayload
<ActiveStormCountPayload
>>
getMeteogramForecastData
▸ getMeteogramForecastData<T
>(model
, latLonStep
, pointForecastOptions?
, httpOptions?
): Promise
<HttpPayload
<MeteogramDataPayload
>>
Gets enhanced point forecast meteogram data for given location
Type parameters
Name | Type |
---|---|
T | extends LatLonStep |
Parameters
Name | Type |
---|---|
model | "drought" | "radar" | "satellite" | "radarPlus" | "capAlerts" | "topoMap" | "gfs" | "ecmwf" | "ecmwfAnalysis" | "ecmwfWaves" | "gfsWaves" | "icon" | "cams" | "efi" | "cmems" | "fireDanger" | "activeFires" | "nems" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeFrance" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "camsEu" | "czeAladin" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "bomAccessAd" | "bomAccessBn" | "bomAccessDn" | "bomAccessNq" | "bomAccessPh" | "bomAccessSy" | "bomAccessVt" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" |
latLonStep | T |
pointForecastOptions? | Record <string , string > |
httpOptions? | HttpOptions |
Returns
Promise
<HttpPayload
<MeteogramDataPayload
>>
Promise with HTTP payload
getMeteogramForecastUrl
▸ getMeteogramForecastUrl<T
>(model
, «destructured»
, pointForecastOptions?
): Promise
<string
>
Gets enhanced point forecast meteogram data for given location
Type parameters
Name | Type |
---|---|
T | extends LatLonStep |
Parameters
Name | Type |
---|---|
model | "drought" | "radar" | "satellite" | "radarPlus" | "capAlerts" | "topoMap" | "gfs" | "ecmwf" | "ecmwfAnalysis" | "ecmwfWaves" | "gfsWaves" | "icon" | "cams" | "efi" | "cmems" | "fireDanger" | "activeFires" | "nems" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeFrance" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "camsEu" | "czeAladin" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "bomAccessAd" | "bomAccessBn" | "bomAccessDn" | "bomAccessNq" | "bomAccessPh" | "bomAccessSy" | "bomAccessVt" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" |
«destructured» | T |
pointForecastOptions? | Record <string , string > |
Returns
Promise
<string
>
Promise with HTTP payload
getObservationPoiUrl
▸ getObservationPoiUrl(type
, id
): string
Get URL for getting observations for a specific station in node-poi server
Parameters
Name | Type |
---|---|
type | "stations" | StationOrPoiType |
id | string |
Returns
string
getPointForecastData
▸ getPointForecastData<T
>(model
, latLonStepInterpolate
, pointForecastOptions?
, httpOptions?
): Promise
<HttpPayload
<WeatherDataPayload
<DataHash
>>>
Gets point forecast data for given location
Type parameters
Name | Type |
---|---|
T | extends LatLonStep |
Parameters
Name | Type | Description |
---|---|---|
model | "drought" | "radar" | "satellite" | "radarPlus" | "capAlerts" | "topoMap" | "gfs" | "ecmwf" | "ecmwfAnalysis" | "ecmwfWaves" | "gfsWaves" | "icon" | "cams" | "efi" | "cmems" | "fireDanger" | "activeFires" | "nems" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeFrance" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "camsEu" | "czeAladin" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "bomAccessAd" | "bomAccessBn" | "bomAccessDn" | "bomAccessNq" | "bomAccessPh" | "bomAccessSy" | "bomAccessVt" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" | Forecast model |
latLonStepInterpolate | T | - |
pointForecastOptions? | Record <string , string > | Additional options of point forecast API |
httpOptions? | HttpOptions | Additional HTTP options |
Returns
Promise
<HttpPayload
<WeatherDataPayload
<DataHash
>>>
Promise with HTTP payload
getPointForecastUrl
▸ getPointForecastUrl<T
>(model
, «destructured»
, pointForecastOptions?
): Promise
<string
>
Gets point forecast data URL for given location
Type parameters
Name | Type |
---|---|
T | extends LatLonStep |
Parameters
Name | Type | Description |
---|---|---|
model | "drought" | "radar" | "satellite" | "radarPlus" | "capAlerts" | "topoMap" | "gfs" | "ecmwf" | "ecmwfAnalysis" | "ecmwfWaves" | "gfsWaves" | "icon" | "cams" | "efi" | "cmems" | "fireDanger" | "activeFires" | "nems" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeFrance" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "camsEu" | "czeAladin" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "bomAccessAd" | "bomAccessBn" | "bomAccessDn" | "bomAccessNq" | "bomAccessPh" | "bomAccessSy" | "bomAccessVt" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" | Forecast model |
«destructured» | T | - |
pointForecastOptions? | Record <string , string > | Additional options of point forecast API |
Returns
Promise
<string
>
URL string for getting point forecast data