Helper Functions
A number of helper functions are provided to make things easier for you in integration.
Helper Functions
Function | Description | Returns |
---|---|---|
log(message) | Send the message (string) to the device’s debug log so it can be viewed in debug mode or in the device logs if the device's log level is set to "Debug". | null |
message(message, level) | Display a message (string) banner on top of the screen. Takes an optional level which is one of: debug (default) | log | info | warn | error | null |
getValue(argumentKey) | For Custom Apps. Get argument value by its unique key (string). | argument value (string, boolean or number) |
Code Samples
import { log } from '@telemetrytv/sdk'
log('SDK successfully loaded!')
import { message } from '@telemetrytv/sdk'
message('SDK successfully loaded!', 'info')
import { getValue } from '@telemetrytv/sdk'
getValue('yourArgumentKey').then((myValue) => {
console.log('The value of "yourArgumentKey" is:', myValue)
})
Updated 5 months ago
What’s Next