Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Set to “app” by default. May be set to “custom” if app.gumband.com is not the instance of Gumband to which you’re connecting your exhibit. If set to “custom”, the “customServerIP” option must also be definedsdk can connect the “customServerIP” option or 0.0.0.0 if “customServerIP“ is left undefined.

customServerIP: string

If the “endpoint” configuration option is set to “custom”, this option must also can be set in order to tell the SDK the IP address of the Gumband server to which it is connecting. Set to 0.0.0.0 by default.

version: string

The version of the Gumband Cloud to which the exhibit should connect. Set to “v1” by default.

...

An IP for the user provided MQTT broker. The SDK will attempt to open an MQTT client connection to this IP and the port from the MQTTBrokerPort option.

MQTTBrokerPort: number

Only applicable if the “gbttEnabled” option is true. This option is the port that the local MQTT broker is exposed on, or the port that the SDK should attempt to connect to if running a third part MQTT broker.

skipOrganizationFileSync: boolean

...

getOperatingMode( ): Promise<boolean>

Get the current operating mode for the exhibit from Gumband.

...

titleExample

...

Note

The Operating Mode feature is deprecated and disabled by default. You can continue to use it, but we plan to replace it with a more functional feature in the future. When the feature is disabled, this method will always resolve false. To enable the OperatingMode feature, call the setOperatingMode method once while the SDK is connected to the Gumband platform.

Get the current operating mode for the exhibit from Gumband.

Expand
titleExample
Code Block
languagejs
let operatingMode = await gumbandSDK.getOperatingMode();

console.log(`Operating Mode: ${operatingMode}`);
// Operating Mode: true

setOperatingMode(opMode: boolean): Promise<void>

Set the operating mode for the exhibit in Gumband.

opMode

The target operating mode.

Note

The Operating Mode feature is deprecated and disabled by default. You can continue to use it, but we plan to replace it with a more functional feature in the future. To enable the OperatingMode feature, call the setOperatingMode method once while the SDK is connected to the Gumband platform.

Set the operating mode for the exhibit in Gumband.

opMode

The target operating mode.

Expand
titleExample
Code Block
languagejs
await gumbandSDK.setOperatingMode(true);

...

metrics.create(eventName: string, data: object)

Creates an event within the bounds of a start and end interaction a metrics event for a given exhibit

Expand
titleExample
Code Block
gumbandSDK.metrics.create('Use_Pressed_Button_1', { buttonType: 'accept', score: 72, isGameOver: false});

...

metrics.startInteraction(data?: object)

...

)

Starts an active interaction for a given exhibit.

Expand
titleExample
Code Block
gumbandSDK.metrics.startInteraction()

metrics.createConcurrent(eventName: string, data: object, interactionId?: string): string

This method is identical to the create method except that it attaches an interactionId to each event, so Gumband can tell the difference between events for different, concurrent interactions. It will return the generated interactionId so it can be attached to future events for this interaction.

Expand
titleExample
Code Block
gumbandSDK.metrics.createConcurrent('Use_Pressed_Button_1', { buttonType: 'accept', score: 72, isGameOver: false}, interactionId);

metrics.startConcurrentInteraction(data: object, interactionId?: string): string

This method is identical to the startInteraction method except that it generates and attaches an interactionId to each event, so Gumband can tell the difference between events for different, concurrent interactions. It will return the generated interactionId so it can be attached to future events for this interaction.

Expand
titleExample
Code Block
gumbandSDK.metrics.startConcurrentInteraction({}, interactionId);

metrics.endConcurrentInteraction(data: object, interactionId: string): string

This method is identical to the endInteraction method except that it attaches an interactionId to each event, so Gumband can tell the difference between events for different, concurrent interactions.

Expand
titleExample
Code Block
gumbandSDK.metrics.startInteractionstartConcurrentInteraction({}, interactionId);

Notification

notifications.email(message: string): Promise<void>

...

Expand
titleExample
Code Block
languagejs
gumbandSDK.on(Sockets.SETTING_LIST_ITEM_DELETED, (payload) => {
    console.log(payload);
    
    // {
    //   "id": "list_manifest_id",
    //   "value": [
    //     {
    //       "id": "deleted_list_item_name",
    //       "value": [ ...listItemValues ]
    //     }
    //   ]
    // }
});

Sockets.OP_MODE_RECEIVED

Note

The Operating Mode feature is deprecated and disabled by default. You can continue to use it, but we plan to replace it with a more functional feature in the future. While the feature is disabled, this event will not be emit to your software. To enable the OperatingMode feature, call the setOperatingMode method once while the SDK is connected to the Gumband platform.

Emitted when the Operation Mode is changed, usually through the Exhibit dashboard in the Gumband UI.

...