Set of methods to operate eitri-app data storage
Notes:
Storage data is not shared between different eitri-apps. Data is transmitted as a string and handled with JSON encoding/decoding. Pay attention to the size of the data to avoid affecting the experience.
Clears all data created by the respective eitri-app from storage
Note:
This method does not clear other data saved by other eitri-apps
Example:
await Eitri.storage.clear() Copy
await Eitri.storage.clear()
Compatibility Control API LEVEL 1 - Functionality added
Compatibility Control
1
Retrieves a stored string from the eitri-app storage
const storedValue = await Eitri.storage.getItem('myData') Copy
const storedValue = await Eitri.storage.getItem('myData')
Registration key
Retrieves a stored Object from the eitri-app storage
const myObject = await Eitri.storage.getItemJson('myData') Copy
const myObject = await Eitri.storage.getItemJson('myData')
Compatibility Control API LEVEL 1 - *Functionality added
Retrieves all registration keys stored by the respective eitri-app from storage
const myKeys = await Eitri.storage.keys() Copy
const myKeys = await Eitri.storage.keys()
Deletes the data associated with the specified key from the eitri-app storage
await Eitri.storage.removeItem('myData') Copy
await Eitri.storage.removeItem('myData')
Stores a string in the eitri-app storage
await Eitri.storage.setItem('myDataKey', "myData") Copy
await Eitri.storage.setItem('myDataKey', "myData")
Key for registration
Value to be saved
Stores an Object in the eitri-app storage
let myObject = {myData: 'valueOfMyData'}await Eitri.storage.setItemJson('myData', myObject) Copy
let myObject = {myData: 'valueOfMyData'}await Eitri.storage.setItemJson('myData', myObject)
JSON object to be saved
Generated using TypeDoc
Set of methods to operate eitri-app data storage
Notes:
Storage data is not shared between different eitri-apps. Data is transmitted as a string and handled with JSON encoding/decoding. Pay attention to the size of the data to avoid affecting the experience.