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 يعني أن الخطة ليس لديها مُضيف
نفس شكل ماكس مايلبوكس: صفر للبريد. اقرأ الرقم بدلا من المطابقة على اسم الخطة -- اليوم الذي تتغير فيه الخطط، الصفحة التي تطابق هي التي تقع.
النصيب الـ ليس a بدل استضافة
وهو مخزن أغراض الحساب - الذي يتقاسمه مع الملفات وصناديق البريد وكل شيء آخر يحتفظ به للحساب. 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()