Methods
create(properties, erroropt, successopt)
A request to create a module:ct-alerts/Trigger
.
If the request is successful, an ADDED event will be raised (see
module:ct-alerts/TriggerServiceEvents
).
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
properties |
map |
The properties of the trigger to be created. Should contain the following:
|
|
error |
function |
<optional> |
A callback that will be invoked if the request fails. |
success |
function |
<optional> |
A callback that will be invoked when the request succeeds. |
disable Trigger(trigger, erroropt, successopt)
Disables a trigger in the system.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
trigger |
ct-alerts |
The trigger to be disabled. |
|
error |
function |
<optional> |
callback invoked on streamlink contrib error. |
success |
function |
<optional> |
callback invoked on successful trigger disabling. |
Throws:
-
If trigger parameter is not a Trigger, not found in the current list, or if error and success are not functions.
- Type
-
br
/Errors .INVALID _PARAMETERS
dispose(trigger, erroropt, successopt)
A request to dispose the given trigger, removing it from the user's list of triggers.
If the request is successful, a REMOVED event will be raised (see
module:ct-alerts/TriggerServiceEvents
).
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
trigger |
module:ct-alerts |
The trigger to dispose. |
|
error |
function |
<optional> |
A callback that will be invoked if the request fails. |
success |
function |
<optional> |
A callback that will be invoked when the request succeeds. |
enable Trigger(trigger, erroropt, successopt)
Enables a trigger in the system.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
trigger |
ct-alerts |
The trigger to be enabled. |
|
error |
function |
<optional> |
callback invoked on streamlink contrib error. |
success |
function |
<optional> |
callback invoked on successful trigger enabling. |
Throws:
-
If trigger parameter is not a Trigger, not found in the current list, or if error and success are not functions.
- Type
-
br
/Errors .INVALID _PARAMETERS