MediaList

Class finesse.restservices.MediaList

Extends finesse.restservices.RestCollectionBase

Represents the list of non-voice media such as chat and email for an agent. The media list available for an agent can be procured from the finesse.restservices.User object, which corresponds to the agent. Individual media channels can be extracted from the media list using their Id.

Example

Code Snippet
CopymediaList = _user.getMediaList({
    onCollectionAdd: _handleMediaAdd,
    onCollectionDelete: _handleMediaDelete,
    onLoad: _handleMediaListLoaded
});

_mediaCollection = mediaList.getCollection();
for (var mediaId in _mediaCollection) {
    if (_mediaCollection.hasOwnProperty(mediaId)) {
        media = _mediaCollection[mediaId];
        etc...
    }
}

For additional parameters and methods, see RestCollectionBase Common Parameters.

Method

getMedia(options)

Retrieves a specific media with the Id passed from the MediaList collection.

Example

Code Snippet
Copyvar media = mediaList.getMedia({
    id: mediaId,
    onLoad: _onloadCallback,
    onChange: _onChangeCallback,
    onAdd: _onAddCallback,
    onDelete: _onDeleteCallback,
    onError: _onErrorCallback,
    mediaOptions: {
        maxDialogLimit: _dialogLimit,
    }
});

Parameters

Name

Type

Description

Required

options

Object

Options for the media object.

For additional parameters and methods, see RestBase Common Parameters.

Yes

Returns

{finesse.restservices.Media} The Media object.