Normalize object to remove unused properties
Name | Type | Description | |
---|---|---|---|
obj | object |
valid object to normalize. |
normalize(obj);
// => { ... }
object
normalize object
Parse given alert from xml to json
Name | Type | Description | |
---|---|---|---|
alertXml | string |
valid alert xml. |
parseAlert(alertXml)
.then(alert => { ... }) // => { identifier: ..., info: { ... } }
.catch(error => { ... });
Promise
promise resolve with alert on success or error on failure.
Parse given alert feed from xml to json
Name | Type | Description | |
---|---|---|---|
source | object |
valid alert feed readable stream. |
parseFeed(readableStream)
.then(feed => { ... }) // => { channel: ..., items: { ... } }
.catch(error => { ... });
Promise
promise resolve with alert feed on success or error on failure.
Issue http get request to fetch specific alert.
Name | Type | Description | |
---|---|---|---|
optns | object |
valid fetch options. | |
optns.url | string |
valid alert full url. |
const optns = { url: ... };
fetchAlert(optns)
.then(alert => { ... })
.catch(error => { ... });
Promise
promise resolve with alert in CAP format on success or error on failure.
Issue http get request to fetch alerts feed.
Name | Type | Description | |
---|---|---|---|
optns | object |
valid fetch options. | |
optns.url | string |
valid alert feed full url. |
const optns = { url: ... };
fetchFeed(optns)
.then(alert => { ... })
.catch(error => { ... });
Promise
promise resolve with alerts in feed format on success or error on failure.
Issue http get request to fetch alerts from feed.
Name | Type | Description | |
---|---|---|---|
optns | object |
valid fetch options. | |
optns.url | string |
valid alert feed full url. |
const optns = { url: ... };
fetchAlerts(optns)
.then(alert => { ... })
.catch(error => { ... });
Promise
promise resolve with alerts in CAP format on success or error on failure.
Documentation generated with doxdox.