AmazonNativeProgramProvider
Interface for the Program Lineup Provider Turbo Module that allows KeplerScript code to use Native Program Lineup Provider API functions so that program data can be provided for the EPG from KeplerScript apps.
Extends
KeplerTurboModule
Properties
getConstants()?
readonly
optional
getConstants: () =>object
Returns
object
Inherited from
KeplerTurboModule.getConstants
getMajorVersion()
getMajorVersion: () =>
number
Returns
number
Overrides
KeplerTurboModule.getMajorVersion
getMinorVersion()
getMinorVersion: () =>
number
Returns
number
Overrides
KeplerTurboModule.getMinorVersion
getPatchVersion()
getPatchVersion: () =>
number
Returns
number
Overrides
KeplerTurboModule.getPatchVersion
Methods
clearAllPrograms()
clearAllPrograms():
Promise
<Object
>
Clears all programs from the data store.
Returns
Promise
<Object
>
a status object with a numeric error code and string message. Status 0 is returned for success, and positive numbers for various errors.
Details
Removes all programs from the data store. This action is not persisted until commit()
is called.
This will not clear channel information from the data store. Utilize this function exclusively when there is a need
to remove mistakenly added programs from the Electronic Program Guide (EPG). The clearAllPrograms()
function call
must preceed all calls to upsert()
within the same transaction.
commit()
commit(
version
):Promise
<Object
>
Commits any pending operations to the data store.
Parameters
version
string
A string representing the version of the program lineup that will be in the data store as a result of this commit.
Returns
Promise
<Object
>
a status object with a numeric error code and string message. Status 0 is returned for success, and positive numbers for various errors.
Details
This function should be called once after performing operations on the provider using the other methods in the provider interface.
getLastCommittedVersion()
getLastCommittedVersion():
Promise
<Object
>
Gets the version of the most recently committed program lineup.
Returns
Promise
<Object
>
A JavaScript object with properties "version", "statusCode", and "errorMessage". Numeric statusCode 0 is returned for success, and positive numbers for various errors.
Details
The program lineup version can be checked to determine if the last persisted program data needs to be replaced with a newer version. If no lineup has been previously committed, the fixed string "NO_VERSION" will be returned.
upsert()
upsert(
programs
):Promise
<Object
>
Upserts a list of programs for the program lineup in the EPG.
Parameters
programs
IProgram
[]
An array of program instances to be inserted.
Returns
Promise
<Object
>
a status object with a numeric error code and string message. Status 0 is returned for success, and positive numbers for various errors.
Details
Inserts or updates programs into the data store. This upsert is not persisted until commit() is called afterwards.
upsert2()
upsert2(
programs
):Promise
<Object
>
Upserts a list of programs for the program lineup in the EPG. Will skip any programs that fail to be inserted and will continue to try to insert the rest of the programs provided.
Parameters
programs
IProgram
[]
An array of program instances to be inserted.
Returns
Promise
<Object
>
A JavaScript object with with properties "failures", "statusCode", and "errorMessage". Status 0 is returned for success, and positive numbers for various errors.
Details
Inserts or updates programs into the data store. This upsert is not persisted until commit() is called.
Last updated: Sep 30, 2025