Methods
-
create(properties, erroropt, successopt)
-
A request to create a
module:caplin/alerts/Trigger
.If the request is successful, an ADDED event will be raised (see
module:caplin/alerts/TriggerServiceEvents
).Parameters:
Name Type Attributes Description properties
map The properties of the trigger to be created. Should contain the following: - subject
- (String) The subject of the instrument to be monitored by the trigger.
- condition
- (String) The condition that when met will trigger the trigger.
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. -
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:caplin/alerts/TriggerServiceEvents
).Parameters:
Name Type Attributes Description trigger
module:caplin/alerts/Trigger 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.