getStorageInfo
Description
Get information about the memory storage of a miniapp
Parameters
Param | Data type | Required | Description |
---|---|---|---|
appId | number | Yes | ID of the mini app, registered via Merchant Portal |
Return Value
Param | Data type | Description |
---|---|---|
quota | number | The memory capacity that the miniapp is allocated |
used | number | The memory capacity that the miniapp has used |
remaining | number | The free memory capacity |
Error Code
N/A
Sample Code and Sample Return Data
Sample Request:
window.zlpSdk.Storage
.getStorageInfo({ appId: -9999 })
.then((response) => console.log(response))
.catch((error) => console.error(error.errorCode));
Sample Response:
{
data: {
quota: 4096,
used: 2048,
remaining: 2048
},
status: "success"
}