Versions Compared

Key

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

...

Code Block
languagejs
constructor (token: string, exhibitId: number, manifestLocationmanifest: stringObject, options = {})

token

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

...

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.

...

manifest

The directory path to the JSON file that defines the exhibit manifestexhibit manifest. See the Exhibit Manifest Configuration docs for how to structure the manifest object.

options

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

...

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.

...

Expand
titleExample
Code Block
languagejs
gumbandSDK.on(Sockets.FILE_DELETED, (payload) => {
    console.log(payload);
    
    // { 
    //   file: 'deletedFileName.png'
    // }
});

Sockets.ERROR

Emitted when any error is logged to the local logger via Gumband.

Expand
titleExample
Code Block
languagejs
gumbandSDK.on(Sockets.ERROR, (payload) => {
    console.log(payload);
    
    // This is an error message
    // Note: you can forward these errors to the Gumband UI by calling:
    // gumbandSDK.logger.error(payload);
});