client.storage.getUsage
Get storage usage statistics.
Signature
class Client {
storage: {
getUsage(): Promise<StorageUsage>
}
}
Examples
const usage = await bf.storage.getUsage()
console.log(`${usage.objectCount} objects, ${usage.totalBytes} bytes`)
Throws
| Error | Condition |
|---|---|
| API request failed |
| Network issue |
Pitfalls
- Cached data — usage stats may be cached for up to 5 minutes
See also
{auto-injected}
Tested against
{auto-injected}