AbstractProgramService
On this page
- title: AbstractProgramService
- Classes
- AbstractProgramService ⇐
Abstract
- AbstractProgramService()
- AbstractProgramService()
- getProgramGrid([options]) ⇒
Promise.<ProgramGrid>
getProgramsByChannel(channel, [options]) ⇒Promise.<Array.<AbstractGridProgram>, Error>
- search(textToSearch, options) ⇒
Promise.<Array.<AbstractGridProgram>, Error>
- getStartOverStream(program, options) ⇒
Promise.<AbstractStartOverMedia, Error>
- _getProgramGrid([options]) ⇒
Promise.<Section>
- _search(textToSearch, options) ⇒
Promise.<Array.<AbstractGridProgram>, Error>
- _getStartOverStream(program, options) ⇒
Promise.<AbstractStartOverMedia, Error>
- Section :
Object
- AbstractProgramService
- AbstractProgramService()
- AbstractProgramService()
- getProgramGrid([options]) ⇒
Promise.<ProgramGrid>
getProgramsByChannel(channel, [options]) ⇒Promise.<Array.<AbstractGridProgram>, Error>
- search(textToSearch, options) ⇒
Promise.<Array.<AbstractGridProgram>, Error>
- getStartOverStream(program, options) ⇒
Promise.<AbstractStartOverMedia, Error>
- _getProgramGrid([options]) ⇒
Promise.<Section>
- _search(textToSearch, options) ⇒
Promise.<Array.<AbstractGridProgram>, Error>
- _getStartOverStream(program, options) ⇒
Promise.<AbstractStartOverMedia, Error>
- Section :
Object
title: AbstractProgramService
Classes
- AbstractProgramService ⇐
Abstract
- AbstractProgramService
AbstractProgramService ⇐ Abstract
Kind: global abstract class
Extends: Abstract
Service:
Properties
Name | Type | Description |
---|---|---|
minEmptyBlockDuration | number | EPG: minimum duration between 2 programs to add an empty program. |
maxEmptyBlockDuration | number | EPG: maximum duration of empty programs. |
numberPastDays | number | EPG: number of days in the past to load in the grid (default: 1) |
numberFutureDays | number | EPG: number of days in the future to load in the grid (default: 6) |
modifyOverlappingSections | boolean | Flag to activate auto modification of section overlapping existing ones (default=true) |
- AbstractProgramService ⇐
Abstract
- new AbstractProgramService()
- new AbstractProgramService()
- instance
- .getProgramGrid([options]) ⇒
Promise.<ProgramGrid>
.getProgramsByChannel(channel, [options]) ⇒Promise.<Array.<AbstractGridProgram>, Error>
- .search(textToSearch, options) ⇒
Promise.<Array.<AbstractGridProgram>, Error>
- .getStartOverStream(program, options) ⇒
Promise.<AbstractStartOverMedia, Error>
- ._getProgramGrid([options]) ⇒
Promise.<Section>
- ._search(textToSearch, options) ⇒
Promise.<Array.<AbstractGridProgram>, Error>
- ._getStartOverStream(program, options) ⇒
Promise.<AbstractStartOverMedia, Error>
- .getProgramGrid([options]) ⇒
- inner
- ~Section :
Object
- ~Section :
AbstractProgramService()
The ProgramService exposes the EPG API, and takes care of event normalization.
AbstractProgramService()
Create clean empty fields inside this EPG program service at startup.
getProgramGrid([options]) ⇒ Promise.<ProgramGrid>
Get a map of EPG Programs for multiple channels.
Kind: instance method of AbstractProgramService
Returns: Promise.<ProgramGrid>
- A Promise resolved with a program grid model
Param | Type | Default | Description |
---|---|---|---|
[options] | object | ||
[options.startTime] | number | Date.now() | Beginning of range to get asap |
[options.endTime] | number | options.startTime+12 hours | End of range to get asap |
[options.channelIds] | Array |
| Ids of channels to get asap (default all) |
[options.force] | number | false | Allows to force program grid refresh |
[options.duration] | number |
| Duration in milliseconds before invalidation of cache (if null, $$maxAge value is used by default) |
getProgramsByChannel(channel, [options]) ⇒ Promise.<Array.<AbstractGridProgram>, Error>
Promise.<Array.<AbstractGridProgram>, Error>
Deprecated
WARNING : DEPRECATED! This function will be deleted in future release. See getProgramGrid instead
Kind: instance method of AbstractProgramService
Returns: Promise.<Array.<AbstractGridProgram>, Error>
- A Promise resolved with an array of Programs
See
- getProgramGrid
Get an array of EPG Programs for a single channel. You can specify either startTime and endtime or startTime and a number of programs to return. Both an end time and a number of programs can be given. In this case both restrictions are respected : the returned programs will never exceed the end time nor the number.
Param | Type | Default | Description |
---|---|---|---|
channel | string | AbstractChannel | channel object or channel ID. | |
[options] | Object | ||
[options.startTime] | number | Date.now() | Beginning of range. The first program covers at least this time and may begin before. |
[options.endTime] | number | options.startTime+12 hours if !options.number | End of range. The last program covers at least this time and may finish later. |
[options.number] | number | number of programs to return. Has priority over endTime if present. | |
[options.force] | number | false | Allows to force program grid refresh |
search(textToSearch, options) ⇒ Promise.<Array.<AbstractGridProgram>, Error>
Search programs in EPG data. the Search can look into all the following fields
Kind: instance method of AbstractProgramService
Returns: Promise.<Array.<AbstractGridProgram>, Error>
- A Promise resolved with an array of Programs
See: AbstractGridProgram
Param | Type | Description |
---|---|---|
textToSearch | string | text to search on epg. |
options | Object |
getStartOverStream(program, options) ⇒ Promise.<AbstractStartOverMedia, Error>
Get the start over stream of a program
Kind: instance method of AbstractProgramService
Returns: Promise.<AbstractStartOverMedia, Error>
- a promise
Param | Type | Description |
---|---|---|
program | Object | The program |
options | Object |
_getProgramGrid([options]) ⇒ Promise.<Section>
Vendor implementation to get the EPG.
Kind: instance abstract method of AbstractProgramService
Returns: Promise.<Section>
- A Promise resolved with data for program grid (see ProgramGrid)
Access: protected
Param | Type |
---|---|
[options] | Object |
_search(textToSearch, options) ⇒ Promise.<Array.<AbstractGridProgram>, Error>
Vendor implementation that returns a list of program in epg data. the Search can look into all the following fields
Kind: instance abstract method of AbstractProgramService
Returns: Promise.<Array.<AbstractGridProgram>, Error>
- A Promise resolved with an array of Programs
Access: protected
See: AbstractGridProgram
Param | Type | Description |
---|---|---|
textToSearch | string | text to search on EPG. |
options | object |
_getStartOverStream(program, options) ⇒ Promise.<AbstractStartOverMedia, Error>
Vendor implementation to get the start over stream
Kind: instance abstract method of AbstractProgramService
Returns: Promise.<AbstractStartOverMedia, Error>
- a promise
Param | Type |
---|---|
program | Object |
options | Object |
Section : Object
Kind: inner typedef of AbstractProgramService
Properties
Name | Type | Description |
---|---|---|
channelId | string | Id of the related channel |
endTime | number | The end time of the section (last program start + last program duration) |
ids | Array.<string> | List of programs id in the section (ordered by program start date) |
titles | Array.<string> | List of programs title in the section (ordered by program start date) |
starts | Array.<number> | List of programs start in the section (ordered by program start date) |
durations | Array.<number> | List of programs duration in the section (ordered by program start date) |
posters | Array.<string> | List of programs poster in the section (ordered by program start date) |
tagLines | Array.<string> | List of programs tag line in the section (ordered by program start date) |
genres | Array.<Array.<string>> | List of programs genres in the section (ordered by program start date) |
AbstractProgramService
Kind: global class
- AbstractProgramService
- new AbstractProgramService()
- new AbstractProgramService()
- instance
- .getProgramGrid([options]) ⇒
Promise.<ProgramGrid>
.getProgramsByChannel(channel, [options]) ⇒Promise.<Array.<AbstractGridProgram>, Error>
- .search(textToSearch, options) ⇒
Promise.<Array.<AbstractGridProgram>, Error>
- .getStartOverStream(program, options) ⇒
Promise.<AbstractStartOverMedia, Error>
- ._getProgramGrid([options]) ⇒
Promise.<Section>
- ._search(textToSearch, options) ⇒
Promise.<Array.<AbstractGridProgram>, Error>
- ._getStartOverStream(program, options) ⇒
Promise.<AbstractStartOverMedia, Error>
- .getProgramGrid([options]) ⇒
- inner
- ~Section :
Object
- ~Section :
AbstractProgramService()
The ProgramService exposes the EPG API, and takes care of event normalization.
AbstractProgramService()
Create clean empty fields inside this EPG program service at startup.
getProgramGrid([options]) ⇒ Promise.<ProgramGrid>
Get a map of EPG Programs for multiple channels.
Kind: instance method of AbstractProgramService
Returns: Promise.<ProgramGrid>
- A Promise resolved with a program grid model
Param | Type | Default | Description |
---|---|---|---|
[options] | object | ||
[options.startTime] | number | Date.now() | Beginning of range to get asap |
[options.endTime] | number | options.startTime+12 hours | End of range to get asap |
[options.channelIds] | Array |
| Ids of channels to get asap (default all) |
[options.force] | number | false | Allows to force program grid refresh |
[options.duration] | number |
| Duration in milliseconds before invalidation of cache (if null, $$maxAge value is used by default) |
getProgramsByChannel(channel, [options]) ⇒ Promise.<Array.<AbstractGridProgram>, Error>
Promise.<Array.<AbstractGridProgram>, Error>
Deprecated
WARNING : DEPRECATED! This function will be deleted in future release. See getProgramGrid instead
Kind: instance method of AbstractProgramService
Returns: Promise.<Array.<AbstractGridProgram>, Error>
- A Promise resolved with an array of Programs
See
- getProgramGrid
Get an array of EPG Programs for a single channel. You can specify either startTime and endtime or startTime and a number of programs to return. Both an end time and a number of programs can be given. In this case both restrictions are respected : the returned programs will never exceed the end time nor the number.
Param | Type | Default | Description |
---|---|---|---|
channel | string | AbstractChannel | channel object or channel ID. | |
[options] | Object | ||
[options.startTime] | number | Date.now() | Beginning of range. The first program covers at least this time and may begin before. |
[options.endTime] | number | options.startTime+12 hours if !options.number | End of range. The last program covers at least this time and may finish later. |
[options.number] | number | number of programs to return. Has priority over endTime if present. | |
[options.force] | number | false | Allows to force program grid refresh |
search(textToSearch, options) ⇒ Promise.<Array.<AbstractGridProgram>, Error>
Search programs in EPG data. the Search can look into all the following fields
Kind: instance method of AbstractProgramService
Returns: Promise.<Array.<AbstractGridProgram>, Error>
- A Promise resolved with an array of Programs
See: AbstractGridProgram
Param | Type | Description |
---|---|---|
textToSearch | string | text to search on epg. |
options | Object |
getStartOverStream(program, options) ⇒ Promise.<AbstractStartOverMedia, Error>
Get the start over stream of a program
Kind: instance method of AbstractProgramService
Returns: Promise.<AbstractStartOverMedia, Error>
- a promise
Param | Type | Description |
---|---|---|
program | Object | The program |
options | Object |
_getProgramGrid([options]) ⇒ Promise.<Section>
Vendor implementation to get the EPG.
Kind: instance abstract method of AbstractProgramService
Returns: Promise.<Section>
- A Promise resolved with data for program grid (see ProgramGrid)
Access: protected
Param | Type |
---|---|
[options] | Object |
_search(textToSearch, options) ⇒ Promise.<Array.<AbstractGridProgram>, Error>
Vendor implementation that returns a list of program in epg data. the Search can look into all the following fields
Kind: instance abstract method of AbstractProgramService
Returns: Promise.<Array.<AbstractGridProgram>, Error>
- A Promise resolved with an array of Programs
Access: protected
See: AbstractGridProgram
Param | Type | Description |
---|---|---|
textToSearch | string | text to search on EPG. |
options | object |
_getStartOverStream(program, options) ⇒ Promise.<AbstractStartOverMedia, Error>
Vendor implementation to get the start over stream
Kind: instance abstract method of AbstractProgramService
Returns: Promise.<AbstractStartOverMedia, Error>
- a promise
Param | Type |
---|---|
program | Object |
options | Object |
Section : Object
Kind: inner typedef of AbstractProgramService
Properties
Name | Type | Description |
---|---|---|
channelId | string | Id of the related channel |
endTime | number | The end time of the section (last program start + last program duration) |
ids | Array.<string> | List of programs id in the section (ordered by program start date) |
titles | Array.<string> | List of programs title in the section (ordered by program start date) |
starts | Array.<number> | List of programs start in the section (ordered by program start date) |
durations | Array.<number> | List of programs duration in the section (ordered by program start date) |
posters | Array.<string> | List of programs poster in the section (ordered by program start date) |
tagLines | Array.<string> | List of programs tag line in the section (ordered by program start date) |
genres | Array.<Array.<string>> | List of programs genres in the section (ordered by program start date) |