...
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.
SDK Base Function Library
isReady( )
Returns true if Gumband is connected to the Gumband Cloud and is ready to process requests. Useful when the Gumband SDK is initialized in multiple places since the constructor returns a singleton and it is possible to "miss" the READY event if an event listener is not configured yet.
...
Expand |
---|
|
Code Block |
---|
| console.log(gumbandSDK.getOnlineHardware());
//[
// {
// hardwareId: 83,
// name: 'Gumband SDK Tutorial',
// peripherals: { Button: [Object], LED: [Object] }
// }
//] |
|
Exhibit
exhibit.getManifest( ): Promise<Manifest>
...
The database ID of the StrapiContent.
Hardware
hardware.set(topic: string, value): Promise<void>
...
The raw value to be parsed directly by the hardware.
Content
content.getRemoteFileList( ): Promise<Response<File[ ]>
...
Expand |
---|
|
Code Block |
---|
| await gumbandSDK.content.downloadFile("gumband-cassette.png"); |
|
Event
event.create(eventName: string, data: any): Promise<void>
...
Expand |
---|
|
Code Block |
---|
| await gumbandSDK.event.create("Red Button Pressed", { holdTime: 2.52 }); |
|
Logger
logger.info(message: string): Promise<void>
...
Expand |
---|
|
Code Block |
---|
| await gumbandSDK.logger.error("This is an error log message"); |
|
Metrics
metrics.broadcastEventConfigs(manifest: object)
...
Expand |
---|
|
Code Block |
---|
gumbandSDK.metrics.startInteraction() |
|
Notification
notifications.email(message: string): Promise<void>
...