Constructor
new StatusPageChecker(options)
The constructor of the status page checker class.
Parameters:
| Name | Type | Description | 
|---|---|---|
options | StatusPageCheckerOptions | The options of the status page checker  | 
Extends
- EventEmitter
 
Members
cache :Collection.<String, IncidentData>
The cache with all page incidents
Type:
- Collection.
<String, IncidentData>  
options :StatusPageCheckerOptions
The options of the status page checker.
webhook :WebhookClient
The webhook client.
Type:
- WebhookClient
 
Methods
(async) check() → {Promise.<(Boolean|DisGroupDevError)>}
The check function
Returns:
- Type:
 - Promise.
<(Boolean| DisGroupDevError)>  
updateIncident(incident, messageIdnullable) → {Promise.<(Boolean|DisGroupDevError)>}
Updates an incident
Parameters:
| Name | Type | Attributes | Default | Description | 
|---|---|---|---|---|
incident | IncidentDataRaw | The raw data of the incident  | ||
messageId | String | <nullable> | null | The id of the webhook message  | 
Returns:
- Type:
 - Promise.
<(Boolean| DisGroupDevError)>  
Events
incidentCheck
Emitted when a check has started.
incidentCreate
Emitted when a new incident has been found
Parameters:
| Name | Type | Description | 
|---|---|---|
incidentData | IncidentData | 
incidentUpdate
Emitted when an incident has been updated
Parameters:
| Name | Type | Description | 
|---|---|---|
incidentData | IncidentData |