SeaMon.saved¶
Description¶
Fetches saved forecast data responses by unique id.
This feature is especially useful for sharing forecast data and meteograms. The data will retain even after
the forecast model data has expired in the service.
Saved forecasts are generated
by SeaMon.forecast by passing save=true
query option during forecast requests.
Functions¶
Returns a JavaScript promise for handling response and exceptions
SeaMon.saved(id, opts={server="https://api.seamon.io",
token=""})
Parameters¶
Parameter | Value | Description |
---|---|---|
id | string | Unique hash for saved forecast data |
handler | function | callback function executed async accepting json data from server |
server | string | Sets SeaMon-API server if other than default |
token | string | Unique access key, see authorization api. |
Example¶
SeaMon.saved('c7b52196d5')
.then(data => {
doSomething(data);
})
.catch(err => {
console.error('caught exception:', err);
});