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.packstringWelcher Plan?
hosts · maxHostsintegerWie viele existieren und wie viele der Plan erlaubt.
usedBytesintegerWas die Gastgeber online halten.
quotaBytesintegerDie Objektspeicherquote des Kontos.
Lesen Sie die Null
Die gleiche Form wie maxMailboxes: 0 für Mail. Lesen Sie die Nummer anstatt auf den Namen eines Plans zu passen – am Tag, an dem die Pläne ändern, ist die Seite, die zutrifft, die zutrifft, die liegt.
QuoteBytes ist kein Hosting-Zuschuss
Es ist der Objektspeicher des Kontos – geteilt mit Dateien, Briefkästen und allem anderen, was für das Konto gespeichert wird. cloud.usage() zeigt die gleiche Zahl von der anderen Seite, wobei object.hostingBytes sagt, wie viel davon gehostet wird.
Zeigen
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()