Transitioning from Legacy

    Transitioning from Legacy


    Article summary

    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 APIBadger ValueFirebolt® APIFirebolt® 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).valuetype: "device"
    $badger.platformAuth().getOat()Authentication.token(TokenType.OAT).valuetype: "oat"
    $badger.getBearerToken()Authentication.token(TokenType.CIMA).valuetype: "billing",
    options.client: "..."

    Lifecycle

    Badger APIBadger ValueFirebolt® APIFirebolt® 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 deeplinkDiscovery.launch(appId, intent)appId: "appId",
    ```intent.action: "home
    $badger.deeplinkToCompanyPage(companyId)companyIdDiscovery.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 APIBadger ValueFirebolt® APIFirebolt® 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: stuffDiscovery.watchNext(tile)title: "...",
    identifiers.assetId: "...",
    identifiers.entityId: "...",
    identifiers.seriesId: "...",
    identifiers.seasonId: "...",
    expires: "ISO 8601 Date/Time",
    images: see spec
    $badger.accountLink().deleteLaunchPadTile(tile)launchPadTile: emptyDiscovery.clearWatchNext()
    $badger.accountLink().mediaEvent(event)contentId, completed, progress, progressUnitsDiscovery.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.xxxtype: "...",
    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 APIBadger ValueFirebolt® APIFirebolt® 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 deeplinkDiscovery.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 APIFirebolt® API
    $badger.info().zipcodeLocalization.postalCode()
    $badger.info().timezoneN/A
    $badger.info().timeZoneN/A
    $badger.info().receiverIdN/A
    $badger.info().deviceHashDevice.uid()
    $badger.info().householdIdDevice.household()
    $badger.info().privacySettings.lmtAdvertising.policy().limitAdTracking
    $badger.info().privacySettings.us_privacyAdvertising.policy().usPrivacy
    $badger.deviceCapabilities().deviceTypeDevice.type()
    $badger.deviceCapabilities().nativeDimensionsDevice.screenResolution()
    $badger.deviceCapabilities().webBrowser.browserTypeDevice.platform()
    $badger.deviceCapabilities().settopHdrSupport & tvHdrSupportDevice.hdr()
    $badger.deviceCapabilities().settopHDCPVersion & tvHDCPVersionDevice.hdcp()
    $badger.deviceCapabilities().videoDimensionsDevice.videoResolution()

    User Prompts

    Badger APIBadger ValueFirebolt® APIFirebolt® 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 APIFirebolt® 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 APIBadger ValueFirebolt® APIFirebolt® Value
    $badger.callback(pid, success, json)Handled by Firebolt Transport Layer

    Was this article helpful?