ContextualVodService

ContextualVodService ⇐ VodService

Kind: global class
Extends: VodService
Service:

ContextualVodService()

Class handling the Contextual VOD service.

getContents(id, options) ⇒ Promise.<ContextualContentList, Error>

Retrieves contextual contents of the given filter.

Kind: instance method of ContextualVodService
Returns: Promise.<ContextualContentList, Error> - Returns a promise holding the list of filtered content
See: ContentFilter

ParamTypeDefaultDescription
idstring | Array.<string>

The identifier or a list of identifier used by filter

optionsObject

some options

[options.filter]ContentFilterContentFilter.BY_CATEGORY

@see constants in ContentFilter

[options.force]booleanfalse

If set to true, don't use the cache

[options.start]number0

The index of the first media to retrieve

[options.number]number

The number of contents to retrieve. If not set, the method returns all contents

[options.duration]number

Duration in milliseconds before invalidation of cache (if null, $$maxAge value is used by default)

getContentDetails(contentId, [options]) ⇒ Promise.<ContextualContent, Error>

Retrieve contextual content details by its identifier and type (MOVIE|SERIES|SEASON|EPISODE)

Kind: instance method of ContextualVodService
Returns: Promise.<ContextualContent, Error> - Returns a promise holding the list of filtered content details

ParamTypeDefaultDescription
contentIdstring

The identifier of a content

[options]Object

some options

[options.force]booleanfalse

If set to true, don't use the cache

[options.duration]number

Duration in milliseconds before invalidation of cache (if null, $$maxAge value is used by default)