وضعیت روز
امروز (یا هر تاریخ) به صورت پرچمهای ماشینخوان — تاریخ قمری، مناسبتهای روز و نشانگرهای ایام سوگ و جشن و روزه و شبهای عبادت — تا سایتها و اپها خودکار حالوهوا بگیرند.
GET https://theshia.org/api/v1/day-status
پارامترها
-
datedefault: today the day to describe, YYYY-MM-DD (years 1900 to 2100). -
calendardefault: moonsighting values: "moonsighting" · "iran".
- Response: date, weekday, hijri { hy, hm, hd, monthName ×4 }, the day's events, and flags: mourning (the extended period 1 Muharram → 8 Rabi al-Awwal plus the Fatimiyya days), season { id, kind } (most specific of 14 liturgical seasons), eid, fastingRecommended, fastingForbidden, ashuraImsak, nightOfWorshipEve.
- nightOfWorshipEve is evening-anchored (the site's night convention): true on the civil day whose EVENING begins a night of worship — Ramadan 18/20/22 for the Nights of Qadr, 14 Sha'ban for its night.
- One if-statement themes a masjid site: mourning → drape, eid → festive.
نمونه کد
curl
curl "https://theshia.org/api/v1/day-status" JavaScript
const res = await fetch("https://theshia.org/api/v1/day-status");
const data = await res.json(); Python
import requests
data = requests.get("https://theshia.org/api/v1/day-status").json() محدودیتها و استفادهٔ منصفانه
پاسخها بهشدت در لبه کش میشوند — لطفاً شما هم کش کنید. درخواستهای بدون کش به ۱۰۰ در دقیقه بهازای هر IP محدودند؛ درخواستهای بیش از ۴۹۶ محاسبهٔ روز×روش رد میشوند. برای استفادهٔ اجتماعی رایگان است، بدون تضمین دسترسپذیری.