Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel2
outlinefalse
typelist
printablefalse

SDK Configuration Options

Here is a list of the configuration options that the SDK constructor takes as parameters.

Code Block
constructor (token: string, exhibitId: number, manifestLocation: string, options = {})

token

The exhibit token generated through the Exhibit/Auth tab in the Gumband UI. This is required to authenticate the SDK with Gumband.

exhibitId

The ID of the exhibit in Gumband. This can be found under the Exhibit/Auth tab in the Gumband UI. This is required to authenticate the SDK with Gumband.

manifestLocation

The directory path to the JSON file that defines the exhibit manifest.

options

All of the remaining optional parameters that enables certain features of the Gumband SDK.

contentLocation: string

Including this option tells the SDK to download a copy of each file in the Exhibit/Files tab of the Gumband UI and save them in this location. The SDK will automatically sync these files each time it starts and connects to Gumband, but the files can also be synced manually with the gb.content.sync() function.

endpoint: string

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 defined.

customServerIP: string

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

version: string

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

noInternetConnection: boolean

Tells the SDK that the exhibit is expected to be disconnected from the internet, and should not attempt to authenticate with Gumband.

noInternetHardwareIds: number[]

An array of hardware ID that should be connected to, even though there is no internet connection. These are Gumband Hardware that should be permitted to connect to the exhibit, even though they have not authenticated themselves with Gumband.

gbttEnabled: boolean

Whether a local MQTT broker (the GBTT service) should be started when the SDK is initialized. This MQTT broker is used to communicate with Gumband Hardware.

gbttPort: number

Only applicable if the “gbttEnabled” option is true. This option is the port that the local MQTT broker is exposed on.

skipOrganizationFileSync: boolean

Set to true by default. Tells the SDK not to download all organization files along with the exhibit files when the “contentLocation” option is provided. Exhibit files are only accessible by the exhibit under the Exhibit/Files tab in the Gumband UI, but organization files are available to all exhibits under the organization and can be seen under each exhibits' Files tab. Organization files are prefixed by “[ORG]” and are managed by the Strapi CMS.

Function Library

isReady( )

...

Use a local manifest to update the exhibit items on the gumband cloud. This function updates the SDK cache of the manifest as well.

manifestLocation

The directory path to the manifest.

...