Caplin Trader 5.1.0

Interface: module:ct-alerts/NotificationService

module:ct-alerts/NotificationService

The NotificationService provides access to the user's module:ct-alerts/Notifications.

This service can be accessed from the module:br/ServiceRegistry, using the alias caplin.alerts.notification-service. There is no default implementation for this service.

This interface uses emitr allowing services implementing this interface to trigger events.

The service will emit events defined in module:ct-alerts/NotificationServiceEvents.

Members

status

Methods

dismiss(notification, erroropt, successopt)

A request to dismiss the given notification, removing it from the user's list of notifications.

If the request is successful, a REMOVED event will be raised (see module:ct-alerts/NotificationServiceEvents).

Parameters:
Name Type Attributes Description
notification module:ct-alerts/Notification

The notification to dismiss.

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()

Disposes of any listeners and resources that were used by the service.

getNotificationsCount() → {Number}

Returns a count of the currently active notifications.

Returns:

number of currently active notifications.

Type
Number