Supported Functions
The SDK provides support for many of the JavaScript API functions.
Function support levels
- Fully - The function works exactly as described in the documentation.
- Partially - The function is restricted in some way.
- Mocked - The function works as intended but the results are mocked.
- Not - The function is not (yet) implemented in the SDK. The passed arguments will be logged to the console.
Function |
Support level |
Info |
getVersion() |
Fully |
|
getDeviceInfo() |
Fully |
|
getUserInfo() |
Fully |
|
Asset functions
Function |
Support level |
Info |
getAssetFileUrl |
Fully |
|
getAssetPreviewUrl() |
Fully |
|
getAssetsInFolder |
Fully |
|
getAssetsByTags |
Partially |
Will perform a search only for the first 5 tags passed to the function and within the first 1000 tags of the organisation. |
getAssetsByQuery |
Mocked |
Always returns an empty array |
upload |
Mocked |
Always returns a sequence of events unless no valid ‘file’ or ‘filename’ parameter is passed. The sequence is (‘queued’ -> ‘uploading’ -> ‘uploading’ -> ‘uploading’ -> ‘processing’ -> ‘success’) |
Collection functions
Collections are not persisted to the online-platform but mocked and stored in the browsers local storage.
Function |
Support level |
Info |
addAssetsToCollectionWithId() |
Mocked |
Callback returns the ID of the collection, only when the collection is found in local storage. |
clearCollection() |
Mocked |
Callback returns the ID of the collection, only when the collection is found in local storage. |
createCollection() |
Mocked |
Callback returns the ID of the newly created collection. |
getCollections() |
Mocked |
Returns the mocked collections from local storage. |
addAssetsToCollection() |
Not |
|
openCollection() |
Not |
|
AppsDB Functions (Beta)
Function |
Support level |
Info |
getStoreEntryValue() |
Mocked |
Stored in the browsers’ LocalStorage |
setStoreEntryValue() |
Mocked |
Stored in the browsers’ LocalStorage. If a certain store doesn’t exist, it will be created on the fly. When using appsdb in production, a store has to be created first by using the REST API. |
deleteStoreEntry() |
Mocked |
Removed from the browsers’ LocalStorage. |
getStoreEntries() |
Mocked |
Stored in the browsers’ LocalStorage |
getGlobalStoreEntryValue() |
Mocked |
Data for global stores is supplied via globalStores.json file ( or another file set by the –globalStores cli flag) |
getGlobalStoreEntries() |
Mocked |
Data for global stores is supplied via globalStores.json file ( or another file set by the –globalStores cli flag) |
Other functions
Function |
Support level |
Info |
getShowpadApi() |
Fully |
|
hasFeature() |
Mocked |
Features can be toggled in SDK menu |
share() |
Mocked |
No popup is shown. Callback always returns ‘success’ |
displayModal() |
Mocked |
Always return the ‘reason’ for the first button |
displayToast() |
Mocked |
Always returns ‘timeout’ as reason |
addToShowcase() |
Not |
|
removeFromShowcase() |
Not |
|
refreshShowpadApi() |
Not |
|
getSalesforceApi() |
Not |
|
refreshSalesforceApi() |
Not |
|
trackEvent() |
Not |
|