AbstractProgramService


title: AbstractProgramService

Classes

AbstractProgramServiceAbstract
AbstractProgramService

AbstractProgramService ⇐ Abstract

Kind: global abstract class
Extends: Abstract
Service:
Properties

NameTypeDescription
minEmptyBlockDurationnumber

EPG: minimum duration between 2 programs to add an empty program.

maxEmptyBlockDurationnumber

EPG: maximum duration of empty programs.

numberPastDaysnumber

EPG: number of days in the past to load in the grid (default: 1)

numberFutureDaysnumber

EPG: number of days in the future to load in the grid (default: 6)

modifyOverlappingSectionsboolean

Flag to activate auto modification of section overlapping existing ones (default=true)

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

ParamTypeDefaultDescription
[options]object
[options.startTime]numberDate.now()

Beginning of range to get asap

[options.endTime]numberoptions.startTime+12 hours

End of range to get asap

[options.channelIds]Array

Ids of channels to get asap (default all)

[options.force]numberfalse

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>

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.

ParamTypeDefaultDescription
channelstring | AbstractChannel

channel object or channel ID.

[options]Object
[options.startTime]numberDate.now()

Beginning of range. The first program covers at least this time and may begin before.

[options.endTime]numberoptions.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]numberfalse

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

ParamTypeDescription
textToSearchstring

text to search on epg.

optionsObject

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

ParamTypeDescription
programObject

The program

optionsObject

_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

ParamType
[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

ParamTypeDescription
textToSearchstring

text to search on EPG.

optionsobject

_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

ParamType
programObject
optionsObject

Section : Object

Kind: inner typedef of AbstractProgramService
Properties

NameTypeDescription
channelIdstring

Id of the related channel

endTimenumber

The end time of the section (last program start + last program duration)

idsArray.<string>

List of programs id in the section (ordered by program start date)

titlesArray.<string>

List of programs title in the section (ordered by program start date)

startsArray.<number>

List of programs start in the section (ordered by program start date)

durationsArray.<number>

List of programs duration in the section (ordered by program start date)

postersArray.<string>

List of programs poster in the section (ordered by program start date)

tagLinesArray.<string>

List of programs tag line in the section (ordered by program start date)

genresArray.<Array.<string>>

List of programs genres in the section (ordered by program start date)

AbstractProgramService

Kind: global class

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

ParamTypeDefaultDescription
[options]object
[options.startTime]numberDate.now()

Beginning of range to get asap

[options.endTime]numberoptions.startTime+12 hours

End of range to get asap

[options.channelIds]Array

Ids of channels to get asap (default all)

[options.force]numberfalse

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>

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.

ParamTypeDefaultDescription
channelstring | AbstractChannel

channel object or channel ID.

[options]Object
[options.startTime]numberDate.now()

Beginning of range. The first program covers at least this time and may begin before.

[options.endTime]numberoptions.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]numberfalse

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

ParamTypeDescription
textToSearchstring

text to search on epg.

optionsObject

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

ParamTypeDescription
programObject

The program

optionsObject

_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

ParamType
[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

ParamTypeDescription
textToSearchstring

text to search on EPG.

optionsobject

_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

ParamType
programObject
optionsObject

Section : Object

Kind: inner typedef of AbstractProgramService
Properties

NameTypeDescription
channelIdstring

Id of the related channel

endTimenumber

The end time of the section (last program start + last program duration)

idsArray.<string>

List of programs id in the section (ordered by program start date)

titlesArray.<string>

List of programs title in the section (ordered by program start date)

startsArray.<number>

List of programs start in the section (ordered by program start date)

durationsArray.<number>

List of programs duration in the section (ordered by program start date)

postersArray.<string>

List of programs poster in the section (ordered by program start date)

tagLinesArray.<string>

List of programs tag line in the section (ordered by program start date)

genresArray.<Array.<string>>

List of programs genres in the section (ordered by program start date)