Dokumentácia API
Generovanie 800×480 BMP obrázkov pre E-Ink displeje zobrazujúce harmonogramy pretekov F1 v režime 1bit, B/W/R alebo Spectra 6.
/calendar.bmp
Generuje F1 kalendár ako BMP obrázok (800×480) pre 1bit, 4-bit B/W/R, 4-bit B/W/R/Y a Spectra 6 E-Ink displeje.
Parametre
| Parameter | Typ | Popis |
|---|---|---|
| lang | string |
Kód jazyka pre text kalendára
Hodnoty: cs, de, en, es, fr, it, ja, nl, pl, pt-BR, sk, tr, zh-CN (predvolené:
en)
|
| year | integer |
Rok sezóny pre konkrétne preteky
voliteľný — napr. 2026
|
| round | integer |
Číslo kola (1-24) pre konkrétne preteky
voliteľný — napr. 5
|
| tz | string |
Časové pásmo pre časy v harmonograme (formát IANA)
voliteľný — napr. America/New_York,
Europe/Prague
|
| display | string |
Výstupný režim pre 1bit, B/W/R, B/W/R/Y alebo Spectra 6 displeje
Hodnoty: 1bit,
bwr,
bwry,
spectra6 (predvolené:
1bit)
|
| weather | boolean |
Zapnúť alebo vypnúť vrstvu počasia
Hodnoty: true,
false
|
| weather_type | string |
Ktorý variant údajov o počasí vyrenderovať
Hodnoty: race_day,
current
|
Odpoveď
image/bmp
800×480
1bit / 4-bit B/W/R / 4-bit B/W/R/Y / Spectra 6
1 hour
Ukážky kódu
# Download next race calendar
curl -o calendar.bmp "https://f1.inkycloud.click/calendar.bmp"
# With Czech language and timezone
curl -o calendar.bmp "https://f1.inkycloud.click/calendar.bmp?lang=cs&tz=Europe/Prague"
# Specific race (year and round)
curl -o calendar.bmp "https://f1.inkycloud.click/calendar.bmp?year=2025&round=5"
# B/W/R/Y output for four-color E-Ink
curl -o calendar.bmp "https://f1.inkycloud.click/calendar.bmp?display=bwry"
import httpx
async def get_f1_calendar(lang: str = "en", tz: str = "Europe/Prague"):
"""Download F1 calendar as BMP image."""
async with httpx.AsyncClient() as client:
response = await client.get(
"https://f1.inkycloud.click/calendar.bmp",
params={"lang": lang, "tz": tz}
)
response.raise_for_status()
with open("calendar.bmp", "wb") as f:
f.write(response.content)
print("Calendar saved as calendar.bmp")
# Usage
import asyncio
asyncio.run(get_f1_calendar(lang="cs"))
// Fetch and display calendar
async function loadF1Calendar(lang = 'en', tz = 'Europe/Prague') {
const url = new URL('https://f1.inkycloud.click/calendar.bmp');
url.searchParams.set('lang', lang);
url.searchParams.set('tz', tz);
const response = await fetch(url);
const blob = await response.blob();
// Display in img element
const img = document.getElementById('calendar');
img.src = URL.createObjectURL(blob);
}
// Download as file
async function downloadCalendar() {
const response = await fetch('/calendar.bmp?lang=cs');
const blob = await response.blob();
const link = document.createElement('a');
link.href = URL.createObjectURL(blob);
link.download = 'f1-calendar.bmp';
link.click();
}
Použitie s E-Ink displejom
Načítajte /calendar.bmp a zobrazte ho priamo na E-Ink displeji. Odporúčaný interval obnovy: každých 1-6 hodín. Kompatibilné s ľubovoľným 800×480 E-Ink displejom (napr. Waveshare 7.5", LaskaKit).
Pre LaskaKit / zivyobraz.eu:
- 1 V zivyobraz.eu vyberte ako zdroj obsahu: URL s obrázkom
-
2
Vložte URL:
https://f1.inkycloud.click/calendar.bmp?lang=cs&tz=Europe/Prague - 3 Nastavte interval obnovovania na 1-6 hodín
/teams.bmp
Generovanie BMP obrázka so všetkými F1 tímami, ich jazdcami, fotkami a bodmi v šampionáte v režimoch 1bit, B/W/R, B/W/R/Y alebo Spectra 6.
Parametre
| Parameter | Typ | Popis |
|---|---|---|
| lang | string |
Kód jazyka pre text kalendára
Hodnoty: cs, de, en, es, fr, it, ja, nl, pl, pt-BR, sk, tr, zh-CN (predvolené:
en)
|
| year | integer |
Rok sezóny pre tímové dáta
voliteľný — napr. 2026
|
| display | string |
Výstupný režim pre displej
Hodnoty: 1bit,
bwr,
bwry,
spectra6 (predvolené:
1bit)
|
Odpoveď
image/bmp
800×480
1-bit / 4-bit / Spectra 6
no-store
Ďalšie endpointy
/api/teams/{year}
Získať všetky tímy s jazdcami a bodmi pre sezónu (JSON)
/api/standings/leader
Získať aktuálnych lídrov šampionátu (jazdec a konštruktér)
/api/races/{year}
Zoznam všetkých pretekov danej sezóny
/api/race/{year}/{round}
Detailné informácie o konkrétnych pretekoch vrátane harmonogramu
/api/stats
Štatistiky požiadaviek (posledná hodina a 24 hodín)
/health
Kontrola zdravia služby