Documentation API

Générez des images BMP 800×480 pour écrans E-Ink affichant les horaires des courses de F1 en mode 1bit, B/W/R ou Spectra 6.

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

Génère un calendrier F1 en image BMP (800×480) pour écrans E-Ink 1bit, 4-bit B/W/R, 4-bit B/W/R/Y et Spectra 6.

Paramètres

Parameter Type Description
lang string Code langue pour le texte du calendrier
Valeurs: cs, de, en, es, fr, it, ja, nl, pl, pt-BR, sk, tr, zh-CN (par défaut: en)
year integer Année de saison pour une course spécifique
optionnel — ex. 2026
round integer Numéro de manche (1-24) pour une course spécifique
optionnel — ex. 5
tz string Fuseau horaire pour les horaires (format IANA)
optionnel — ex. America/New_York, Europe/Prague
display string Mode de sortie pour écrans 1bit, B/W/R, B/W/R/Y ou Spectra 6
Valeurs: 1bit, bwr, bwry, spectra6 (par défaut: 1bit)
weather boolean Activer ou désactiver l'overlay météo
Valeurs: true, false
weather_type string Quelle variante de données météo afficher
Valeurs: race_day, current

Réponse

Content-Type image/bmp
Dimensions 800×480
Profondeur de couleur 1bit / 4-bit B/W/R / 4-bit B/W/R/Y / Spectra 6
Cache 1 hour

Exemples de code

# Download next race calendar
curl -o calendar.bmp "https://f1.rhiz3k.freeddns.org/calendar.bmp"

# With Czech language and timezone
curl -o calendar.bmp "https://f1.rhiz3k.freeddns.org/calendar.bmp?lang=cs&tz=Europe/Prague"

# Specific race (year and round)
curl -o calendar.bmp "https://f1.rhiz3k.freeddns.org/calendar.bmp?year=2025&round=5"

# B/W/R/Y output for four-color E-Ink
curl -o calendar.bmp "https://f1.rhiz3k.freeddns.org/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.rhiz3k.freeddns.org/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.rhiz3k.freeddns.org/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();
}

Utilisation sur écran E-Ink

Récupérez /calendar.bmp et affichez-le directement sur votre écran E-Ink. Intervalle de rafraîchissement recommandé : toutes les 1 à 6 heures. Compatible avec tout écran E-Ink 800×480 (par ex. Waveshare 7.5", LaskaKit).

Pour LaskaKit / zivyobraz.eu :

  1. 1 Dans zivyobraz.eu, choisissez comme source de contenu : URL avec image
  2. 2 Collez l'URL: https://f1.rhiz3k.freeddns.org/calendar.bmp?lang=cs&tz=Europe/Prague
  3. 3 Réglez l'intervalle d'actualisation sur 1 à 6 heures
GET /teams.bmp

Générez une image BMP affichant toutes les équipes de F1 avec leurs pilotes, photos et points au championnat dans les modes 1bit, B/W/R, B/W/R/Y ou Spectra 6.

Paramètres

Parameter Type Description
lang string Code langue pour le texte du calendrier
Valeurs: cs, de, en, es, fr, it, ja, nl, pl, pt-BR, sk, tr, zh-CN (par défaut: en)
year integer Année de saison pour les données des équipes
optionnel — ex. 2026
display string Mode de sortie de l'écran
Valeurs: 1bit, bwr, bwry, spectra6 (par défaut: 1bit)

Réponse

Content-Type image/bmp
Dimensions 800×480
Profondeur de couleur 1-bit / 4-bit / Spectra 6
Cache no-store

Autres endpoints

GET /api/teams/{year}

Obtenir toutes les équipes avec pilotes et points pour une saison (JSON)

GET /api/standings/leader

Obtenir les leaders actuels du championnat (pilote et constructeur)

GET /api/races/{year}

Liste de toutes les courses d'une saison

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

Informations détaillées sur une course, y compris l'horaire

GET /api/stats

Statistiques des requêtes (dernière heure et 24 h)

GET /health

Vérification de l'état du service

GET /api

API JSON — Documentation API au format JSON