Caplin Trader 4.5.2

Class: module:caplin/sljsadapter/watchlist/StreamLinkWatchlist

module:caplin/sljsadapter/watchlist/StreamLinkWatchlist

You should never construct this class by yourself; use module:caplin/sljsadapter/providers/StreamLinkWatchlistService#create to construct it for you. This class contains getters for watchlist metadata only (id, name, subject) and a setter for name. To manipulate the watchlist's records, use the contents manager provided by module:caplin/sljsadapter/watchlist/StreamLinkWatchlist#getContentsManager.

Constructor

new module:caplin/sljsadapter/watchlist/StreamLinkWatchlist()

Implements:
See:

Methods

getContentsManager() → {module:caplin/watchlist/WatchlistContentsManager}

Creates and returns a module:caplin/watchlist/WatchlistContentsManager for this watchlist. Only when this method is called for the first time will an actual streamlink subscription to the watchlist's subject be created.
Implements:
Returns:
may be used to modify the watchlist contents.
Type
module:caplin/watchlist/WatchlistContentsManager

getId() → {string}

Returns the unique ID of the watchlist.
Implements:
Returns:
ID
Type
string

getName() → {string}

Returns the display name of the watchlist.
Implements:
Returns:
display name
Type
string

getSubject() → {string}

Returns the streamlink subject for the watchlist's record.
Implements:
Returns:
streamlink subject
Type
string

setName(name, erroropt, successopt)

Makes streamlink contrib to set the name of the watchlist and add the request to list of pending requests. Calls success callback when streamlink changes the name. If the name hasn't been changed after the timeout, error is called.
Parameters:
Name Type Attributes Description
name String the watchlist name to be set
error function <optional>
function to be called if operation fails
success function <optional>
function to be called if operation succeeds
Implements:
See:
Throws:
If name argument is not a string.
Type
module:br/Errors.INVALID_PARAMETERS