const usage = await api.hosts.usage();
if (!usage.maxHosts) {
// This plan has no hosting. Show the limit, with a link to the plans.
}usage = api.hosts.usage()
if not usage["maxHosts"]:
pass # This plan has no hosting. Show the limit, with a link to the plans.packstring计划
hosts · maxHostsinteger有多少存在,以及有多少计划允许。
usedBytesinteger主持人在网上都保留了什么
quotaBytesinteger该账户的实物储存配额。
读取零
最大最大目标: 0 表示计划没有主机
与最大邮件框相同形状: 0 份邮件。 读取数字而不是匹配计划的名称—— 计划变更的当日, 匹配的页面是谎言的页面 。
配额Bytete 不是一个主机津贴
这是账户的物品储存——与文件、信箱和为账户保存的其他一切共享。 cloud.usage() 显示从另一侧的相同数字, object.hostingBytes 说有多少人正在接待它。
展示
const u = await api.hosts.usage();
if (!u.maxHosts) return showPlanLimit();
if (u.hosts >= u.maxHosts) return showAtLimit();
return showCreateButton();def hosting_screen():
u = api.hosts.usage()
if not u["maxHosts"]:
return show_plan_limit()
if u["hosts"] >= u["maxHosts"]:
return show_at_limit()
return show_create_button()