AmazonNativeChannelProvider
Interface for the Channel Lineup Provider Turbo Module that allows KeplerScript code to use Native Channel Lineup Provider API functions so that program data can be provided for the EPG from KeplerScript apps.
Extends
KeplerTurboModule
Properties
commit()
commit: (
version
) =>Promise
<Object
>
Replaces current channel data with the pending channel data added to the commit queue.
Parameters
version
string
A string representing the version of the channel lineup that is being committed.
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 all data has been added to the commit queue using the add() function. When the provider is committed, all preexisting channels will be removed from the data store, and replaced with all of the channels added to this provider object.
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
add()
add(
channels
):Promise
<Object
>
Add a list of channels to the commit queue.
Parameters
channels
An array of channels 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
This function can be called one or more times to add channel data for the EPG.
If there are any channels which fail to be added to the commit queue, an InvalidArgumentError
will be thrown.
The error message will include the total number of failed insertions and the reasons for the first 5 failed channels.
If there is any error returned due to ingested data exceeding the storage limit, a StorageLimitError
will be thrown.
Inserted data will only be committed when the commit()
function is called.
getLastCommittedVersion()
getLastCommittedVersion():
Promise
<Object
>
Gets the version of the most recently committed channel lineup.
Returns
Promise
<Object
>
A JavaScript object with properties "version", "statusCode", and "errorMessage". A status with numeric statusCode 0 is returned for success, and positive numbers for various errors.
Details
The channel lineup version can be checked to determine if the last persisted channel data needs to be replaced with a newer version. If no lineup has been previously committed, the fixed string "NO_VERSION" will be returned.
Last updated: Sep 30, 2025