api.hosts

usage()

api.hosts.usage() → Promise<Usage>

O que il plan permite in hosting, e quanto spazio che lo che è on line toma — contra l'ogget storage del cont.

freeread the zeroquota is the object storage
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

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

Qual plan.

hosts · maxHostsinteger

Quantes egìn, e quantes egìn il plan permetiu.

usedBytesinteger

Qued'hosts mantene on line.

quotaBytesinteger

Quota de stoccaggio de objetos del cont.

Legî il zero

maxHosts: 0 significa che il plan non ha hosting

La stessa forma di maxeMailboxes: 0 per mail. Legga il numero invecès di corrispondere al nome di un plan — il giorno in cui i plans cambia, la pagina che coincide è quella che mente.

quotaBytes non è un'indennità di ospitant

E 'o stoccaggio de objetos del cont - condivisa con files, caixas de postas e tutto o resto custode per il cont. cloud.usage() mostra il medesimo numero da oltre lattura, con object.hostingBytes dicindu quanta di esso ospita.

A mostrarlo

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()