Dokumentacja API

Generuj obrazy BMP 800×480 dla wyświetlaczy E-Ink pokazujące harmonogram wyścigów F1 w trybie 1bit, B/W/R lub Spectra 6.

800×480 BMP 1bit / B/W/R / B/W/R/Y / Spectra 6 E-Ink REST API
GET /calendar.bmp

Generuje kalendarz F1 jako obraz BMP (800×480) dla wyświetlaczy E-Ink 1bit, 4-bit B/W/R, 4-bit B/W/R/Y i Spectra 6.

Parametry

Parameter Typ Opis
lang string Kod języka dla tekstu kalendarza
Wartości: cs, de, en, es, fr, it, ja, nl, pl, pt-BR, sk, tr, zh-CN (domyślny: en)
year integer Rok sezonu dla konkretnego wyścigu
opcjonalny — np. 2026
round integer Numer rundy (1-24) dla konkretnego wyścigu
opcjonalny — np. 5
tz string Strefa czasowa dla godzin harmonogramu (format IANA)
opcjonalny — np. America/New_York, Europe/Prague
display string Tryb wyjścia dla ekranów 1bit, B/W/R, B/W/R/Y lub Spectra 6
Wartości: 1bit, bwr, bwry, spectra6 (domyślny: 1bit)
weather boolean Włącz lub wyłącz nakładkę pogody
Wartości: true, false
weather_type string Który wariant danych pogodowych wyrenderować
Wartości: race_day, current

Odpowiedź

Content-Type image/bmp
Wymiary 800×480
Głębia kolorów 1bit / 4-bit B/W/R / 4-bit B/W/R/Y / Spectra 6
Cache 1 hour
Otwórz obraz

Przykłady kodu

# 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();
}

Użycie z wyświetlaczem E-Ink

Pobierz /calendar.bmp i wyświetl bezpośrednio na swoim wyświetlaczu E-Ink. Zalecany interwał odświeżania: co 1-6 godzin. Kompatybilne z każdym wyświetlaczem E-Ink 800×480 (np. Waveshare 7.5", LaskaKit).

Dla LaskaKit / zivyobraz.eu:

  1. 1 W zivyobraz.eu wybierz jako źródło treści: URL z obrazem
  2. 2 Wklej URL: https://f1.inkycloud.click/calendar.bmp?lang=cs&tz=Europe/Prague
  3. 3 Ustaw interwał odświeżania na 1-6 godzin
GET /teams.bmp

Generuj obraz BMP pokazujący wszystkie zespoły F1 z kierowcami, zdjęciami i punktami mistrzostw w trybach 1bit, B/W/R, B/W/R/Y lub Spectra 6.

Parametry

Parameter Typ Opis
lang string Kod języka dla tekstu kalendarza
Wartości: cs, de, en, es, fr, it, ja, nl, pl, pt-BR, sk, tr, zh-CN (domyślny: en)
year integer Rok sezonu dla danych zespołów
opcjonalny — np. 2026
display string Tryb wyjścia wyświetlacza
Wartości: 1bit, bwr, bwry, spectra6 (domyślny: 1bit)

Odpowiedź

Content-Type image/bmp
Wymiary 800×480
Głębia kolorów 1-bit / 4-bit / Spectra 6
Cache no-store
Otwórz obraz

Inne endpointy

GET /api/teams/{year}

Pobierz wszystkie zespoły z kierowcami i punktami dla sezonu (JSON)

GET /api/standings/leader

Pobierz aktualnych liderów mistrzostw (kierowca i konstruktor)

GET /api/races/{year}

Lista wszystkich wyścigów danego sezonu

GET /api/race/{year}/{round}

Szczegółowe informacje o wyścigu wraz z harmonogramem

GET /api/stats

Statystyki żądań (ostatnia godzina i 24 h)

GET /health

Kontrola stanu usługi

GET /api

JSON API — Dokumentacja API w formacie JSON