ContextualVodService
ContextualVodService ⇐ VodService
Kind: global class
Extends: VodService
Service:
- ContextualVodService ⇐
VodService
- new ContextualVodService()
- .getContents(id, options) ⇒
Promise.<ContextualContentList, Error>
- .getContentDetails(contentId, [options]) ⇒
Promise.<ContextualContent, Error>
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
Param | Type | Default | Description |
---|---|---|---|
id | string | Array.<string> | The identifier or a list of identifier used by filter | |
options | Object | some options | |
[options.filter] | ContentFilter | ContentFilter.BY_CATEGORY | @see constants in ContentFilter |
[options.force] | boolean | false | If set to true, don't use the cache |
[options.start] | number | 0 | 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
Param | Type | Default | Description |
---|---|---|---|
contentId | string | The identifier of a content | |
[options] | Object | some options | |
[options.force] | boolean | false | 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) |