Parameters

    Parameters


    Article summary


    title: Parameters

    version: 0.5.3
    layout: default
    sdk: core

    # Parameters Module

    Version 0.5.3

    OpenRPC

    This document was generated from an OpenRPC JSON-Schema, and is intended to provide a human readable overview and examples of the methods contained in the module.

    For the full schema, see the link below.

    Schema
    parameters.json

    Table of Contents

    Usage

    To use the Parameters module, you can import it into your project from the Firebolt SDK:

    import { Parameters } from '@firebolt-js/sdk'
    

    Overview

    Methods for getting initialization parameters for an app cold launch.

    Events

    Methods

    initialization

    Returns any initialization parameters for the app, e.g. initialial NavigationIntent.

    function initialization(): Promise<AppInitialization>
    

    Promise Resolution

    TypeDescription
    AppInitializationThe initialization parameters.

    Examples

    ##### Default Example

    JavaScript
    import { Parameters } from '@firebolt-js/sdk'
    
    Parameters.initialization()
        .then(init => {
            console.log(init)
        })
    

    Value of init

    {
      "lmt": 0,
      "us_privacy": "1-Y-",
      "discovery": {
        "navigateTo": {
          "action": "entity",
          "data": {
            "entityId": "abc"
          },
          "context": {
            "source": "voice"
          }
        }
      }
    }
    
    JSON-RPC

    ###### Request

    {
      "jsonrpc": "2.0",
      "id": 1,
      "method": "parameters.initialization",
      "params": {}
    }
    

    ###### Response

    {
      "jsonrpc": "2.0",
      "id": 1,
      "result": {
        "lmt": 0,
        "us_privacy": "1-Y-",
        "discovery": {
          "navigateTo": {
            "action": "entity",
            "data": {
              "entityId": "abc"
            },
            "context": {
              "source": "voice"
            }
          }
        }
      }
    }
    

    Schemas

    AppInitialization

    type AppInitialization = {
      us_privacy?: string                  // The IAB US Privacy string.
      lmt?: bigint                         // The IAB limit ad tracking opt out value.
      discovery?: {
        navigateTo?: NavigationIntent      // A Firebolt compliant representation of a user intention to navigate to a specific place in an app.
      }
      secondScreen?: {
        launchRequest?: SecondScreenEvent  // An a message notification from a second screen device
      }
    }
    

    See also:



    Was this article helpful?

    What's Next