- Print
Transitioning from Legacy
- Print
Legacy documentation contains specifications and APIs which have been deprecated. You should always develop using the updated Firebolt® APIs first to ensure your app gets the most out of the X1 App Platform. However, the latest APIs may fail to return a valid value when a user's software is outdated. If an error returns due to the user's software version, then you can have your app call the equivalent deprecated API in its place. The list below contains the most recent updates, API updates, and the corresponding deprecated APIs which they replaced.
$badger to Firebolt®
The $badger documentation below contains information that only applies to hardware with software that has not yet been updated to support the newer Firebolt® APIs. While compatible with the updated software, these older deprecated APIs are generally less functional and should only be utilized if necessary.
This document is designed to help transition your app from $badger API to the upgraded Firebolt® API.
Authentication
Badger API | Badger Value | Firebolt® API | Firebolt® Value |
---|---|---|---|
$badger.gerAppAuth().get() | N/A | ||
$badger.gerAppAuth().upsert(userid, data) | N/A | ||
$badger.gerAppAuth().delete() | N/A | ||
$badger.platformAuth().getToken() | Authentication.token(TokenType.PLATFORM).value | ||
$badger.platformAuth().refreshToken() | Authentication.token(TokenType.PLATFORM) | type: "platform" | |
$badger.platformAuth().getXact() | Authentication.token(TokenType.DEVICE).value | type: "device" | |
$badger.platformAuth().getOat() | Authentication.token(TokenType.OAT).value | type: "oat" | |
$badger.getBearerToken() | Authentication.token(TokenType.CIMA).value | type: "billing" , options.client: "..." |
Lifecycle
Badger API | Badger Value | Firebolt® API | Firebolt® Value |
---|---|---|---|
$badger.shutdown() | Lifecycle.close(CloseReason.USER_EXIT) | reason: "..." | |
$badger.dismissLoadingScreen() | Lifecycle.ready() | ||
$badger.active() | N/A | ||
$badger.config() | N/A | ||
$badger.deeplink(uri) | xre deeplink | Discovery.launch(appId, intent) | appId: "appId" ,```intent.action: "home |
$badger.deeplinkToCompanyPage(companyId) | companyId | Discovery.launch('urn:firebolt:apps:main', sectionIntent) | appId: "urn:firebolt:apps:main", intent.action: "section", intent.data.sectionName: "company:<companyId>" |
$badger.dial().getDeviceId() | SecondScreen.device() | type: "dial" | |
$badger.dial().getDeviceName() | SecondScreen.friendlyName() | type: "dial" | |
$badger.dial().getPayload() | Parameters.config().launchRequest | ||
$badger.dial().onLaunch() | SecondScreen.listen('LaunchRequest') | listen: true |
Discovery & Metrics
Badger API | Badger Value | Firebolt® API | Firebolt® Value |
---|---|---|---|
$badger.accountLink().appLaunch(entitlements) | action: "appLaunch", subscriptionEntitlements: | Discovery.entitlements(entitlements) | entitlements: [see spec] |
$badger.accountLink().compareAppSettings(settings) | N/A | ||
$badger.accountLink().createLaunchPadTile(tile) | launchPadTile: stuff | Discovery.watchNext(tile) | title: "...", identifiers.assetId: "...", identifiers.entityId: "...", identifiers.seriesId: "...", identifiers.seasonId: "...", expires: "ISO 8601 Date/Time", images: see spec |
$badger.accountLink().deleteLaunchPadTile(tile) | launchPadTile: empty | Discovery.clearWatchNext() | |
$badger.accountLink().mediaEvent(event) | contentId, completed, progress, progressUnits | Discovery.watched(event.contentId, Date.now(), progress, event.completed) | entityId: "...", progress: number, completed: boolean, watchedOn: "ISO 8601 Date/Time" |
$badger.accountLink().signIn(entitlements) | action: "signIn", subscriptionEntitlements: | Metrics.app.signIn() | type: "app", event: "signIn", params: ... |
$badger.accountLink().signOut() | action: "signout" | Metrics.app.signOut() | type: "app", event: "signOut", params: ... |
$badger.accountLink().updateEntitlements(entitlements) | action: "entitlementsUpdate" | Discovery.entitlements(entitlements) | entitlements: [see spec] |
$badger.errorMetricsHandler(message, visible, code, args) | eventType: "error", errMsg, errVisible, errCode, evt | Metrics.error(message, code, args) | type: "app", event: "error", params.message: "...", params.code: "...", ```params.visible: true |
$badger.launchCompletedMetricsHandler() | N/A | ||
$badger.pageViewMetricsHandler(page, args) | eventType: "pageView", page: "page", evt: ... | Metrics.page.view(page, args) | type: "page", event: "view", params.xxx // additional params, just like 'evt' |
$badger.appActionMetricsHandler("CONTENT_STATE_CHANGE", "STARTED") | eventType: "appAction", action: "CONTENT_STATE_CHANGED", evt.contentState: "STARTED" | Metrics.content.start(data) | type: "content", event: "start", params.xxx // additional params, just like 'evt' |
$badger.appActionMetricsHandler("CONTENT_STATE_CHANGE", "STOPPED") | eventType: "appAction", action: "CONTENT_STATE_CHANGED", evt.contentState: "STOPPED" | Metrics.content.stop(data) | type: "content", event: "stop", params.xxx // additional params, just like 'evt' |
$badger.userActionMetricsHandler(action, data) | eventType: "userAction", action: "...", evt | Metrics.user.click(args) | type: "user", event: "...", params.xxx // additional params, just like 'evt' |
Metrics.user.input(args) | |||
Metrics.user.event(action, data) | |||
$badger.metricsHandler(action, data) | eventType: "...", action: "...", evt | Metrics.xxx | type: "...", event: "...", params: ... |
$badger.userErrorMetricsHandler(msg, visible, code, args) | eventType: "userError", errMsg, errVisible, errCode, evt | Metrics.user.error(message, code, args) | type: "user", event: "error", params.message: "...", params.code: "...", ``` params.visible: true |
$badger.analytics.error() | Metrics.app.error(message, code, args) | ||
$badger.analytics.event() | Metrics.app.event(message, args) | ||
$badger.analytics.pageView() | Metrics.page.view(page, args) | ||
$badger.analytics.userAction() | See userActionMetricsHandler | ||
$badger.analytics.userError() | See userErrorMetricsHandler |
Events, Settings, & Notifications
Badger API | Badger Value | Firebolt® API | Firebolt® Value |
---|---|---|---|
$badger.subscribeToSettings(CLOSED_CAPTIONING) | keys:"ShowClosedCapture" | Accessibility.listen('closedCaptionsSettingsChanged') | listen: true |
$badger.subscribeToSettings(VOICE_GUIDANCE) | keys: "TextToSpeechEnabled2" | Accessibility.listen('voiceGuidanceSettingsChanged') | listen: true |
$badger.subscribeToSettings(RECOMMENDATIONS_BASED_ON_HISTORY) | keys: "DisplayPersonalizedRecommendations" | Discovery.listen('policyChanged') | listen: true |
$badger.subscribeToSettings(RECENTLY_VIEW_CONTENT) | keys: "RememberWatchedPrograms" | Discovery.listen('policyChanged') | listen: true |
$badger.subscribeToSettings(SHARE_WATCH_HISTORY_STATUS) | keys: "ShareWatchHistoryStatus" | Discovery.listen('policyChanged') | listen: true |
$badger.subscribeToSettings(DEVICE_FRIENDLY_NAME) | keys: "friendly_name" | Device.listen('deviceNameChanged') | listen: true |
Broadcast a deeplink | Discovery.listen('navigateTo') | listen: true | |
$badger.subscribeToSettings(POWER_SAVING) | |||
$badger.userPreferences().closedCaptioning() | keys: "CC_STATE" | Accessibility.closedCaptions() | |
$badger.userPreferences().voiceGuidance() | keys: "VOICE_GUIDANCE_STATE" | Accessibility.voiceGuidance() | |
$badger.networkConnectivity() | Device.network().type | ||
$badger.userPreferences().setting(CLOSED_CAPTIONING) | keys: "CC_STATE" | Accessibility.closedCaptions() | |
$badger.userPreferences().setting(VOICE_GUIDANCE) | keys: "VOICE_GUIDANCE_STATE" | Accessibility.voiceGuidance() | |
$badger.userPreferences().setting(RECOMMENDATIONS_BASED_ON_HISTORY) | keys: "DisplayPersonalizedRecommendations" | Discovery.policy().enableRecommendations | |
$badger.userPreferences().setting(RECENTLY_VIEW_CONTENT) | keys: "RememberWatchedPrograms" | Discovery.policy().rememberWatchedPrograms | |
$badger.userPreferences().setting(SHARE_WATCH_HISTORY_STATUS) | keys: "ShareWatchHistoryStatus" | Discovery.policy().shareWatchHistory | |
$badger.userPreferences().setting(DEVICE_FRIENDLY_NAME) | keys: "friendly_name" | Device.name() |
Info
Badger API | Firebolt® API |
---|---|
$badger.info().zipcode | Localization.postalCode() |
$badger.info().timezone | N/A |
$badger.info().timeZone | N/A |
$badger.info().receiverId | N/A |
$badger.info().deviceHash | Device.uid() |
$badger.info().householdId | Device.household() |
$badger.info().privacySettings.lmt | Advertising.policy().limitAdTracking |
$badger.info().privacySettings.us_privacy | Advertising.policy().usPrivacy |
$badger.deviceCapabilities().deviceType | Device.type() |
$badger.deviceCapabilities().nativeDimensions | Device.screenResolution() |
$badger.deviceCapabilities().webBrowser.browserType | Device.platform() |
$badger.deviceCapabilities().settopHdrSupport & tvHdrSupport | Device.hdr() |
$badger.deviceCapabilities().settopHDCPVersion & tvHDCPVersion | Device.hdcp() |
$badger.deviceCapabilities().videoDimensions | Device.videoResolution() |
User Prompts
Badger API | Badger Value | Firebolt® API | Firebolt® Value |
---|---|---|---|
$badger.userPreferences().promptSignInEmail() | prefillType: "signIn", headerText: "..." | Keyboard.email('signIn') | type: "signIn", message: "..." |
$badger.userPreferences().promptSignUpEmail() | prefillType: "signUp", headerText: "..." | Keyboard.email('signUp') | type: "signUp", message: "..." |
$badger.verifyPin() | content_pin: "..." | N/A | |
$badger.verifyPurchasePin() | purchase_pin: "..." | N/A | |
$badger.showContentPinOverlay() | pin_type: "content_pin" | Profile.verifyContentRating() | None |
$badger.showPurchasePinOverlay() | pin_type: "purchase_pin" | Profile.verifyPurchase() | None |
Ad Platform
Badger API | Firebolt® API |
---|---|
$badger.adPlatform().initObject() | Advertising.config() |
$badger.adPlatform().advertisingId() | Advertising.advertisingId() |
$badger.adPlatform().limitAdTracking() | Advertising.policy().limitAdTracking |
$badger.adPlatform().deviceAdAttributes() | Advertising.deviceAttributes() |
$badger.adPlatform().appStoreId() | Advertising.appStoreId() |
Other
Badger API | Badger Value | Firebolt® API | Firebolt® Value |
---|---|---|---|
$badger.callback(pid, success, json) | Handled by Firebolt Transport Layer |