{
    "name": "DOBRUK API",
    "lang": "pl",
    "host": "api.dobruk.pl",
    "base_url": "https://api.dobruk.pl",
    "status": "ok",
    "time": {
        "now_iso": "2026-05-06T07:12:21+02:00",
        "now": "2026-05-06 07:12:21",
        "timezone": "Europe/Warsaw"
    },
    "links": {
        "opub_docs": "https://dobruk.pl/opub/docs",
        "opub_explorer": "https://dobruk.pl/opub",
        "about": "https://dobruk.pl/zuku"
    },
    "docs": {
        "note": "Ta subdomena jest przeznaczona wyłącznie do API i webhooków. Główna strona: https://dobruk.pl.",
        "endpoints": [
            {
                "path": "/daycard.php",
                "methods": [
                    "GET"
                ],
                "description_en": "Daily \"day card\" API. Returns a calendar card for the requested date (defaults to today in Europe/Warsaw).",
                "description_pl": "API „kartka z kalendarza”. Zwraca kartkę dla podanej daty (domyślnie dzisiaj wg Europe/Warsaw).",
                "parameters": [
                    {
                        "name": "date",
                        "in": "query",
                        "required": false,
                        "type": "string",
                        "format": "YYYY-MM-DD",
                        "description_en": "Target date. If omitted or invalid, API uses today (Europe/Warsaw).",
                        "description_pl": "Docelowa data. Jeśli brak lub błędna – API użyje dzisiejszej (Europe/Warsaw)."
                    }
                ],
                "response_en": {
                    "ok": "boolean",
                    "date": "string (YYYY-MM-DD)",
                    "offset": "int (days difference relative to today)",
                    "pretty_date": "string (Polish formatted date label)",
                    "week_no": "int (ISO week number)",
                    "day_of_year": "int",
                    "days_in_year": "int (365/366)",
                    "is_today": "boolean",
                    "card": "object|null",
                    "card.title": "string",
                    "card.lead": "string",
                    "card.names": "string",
                    "card.events": "string[]",
                    "card.astro": "string[]"
                },
                "notes_en": [
                    "Timezone: Europe/Warsaw.",
                    "The card is looked up by month+day (year-independent) from table calendar__card.",
                    "Locale is fixed to pl-PL and only active entries (status_id=1) are returned.",
                    "If no entry exists for the date, \"card\" is null."
                ],
                "notes_pl": [
                    "Strefa czasowa: Europe/Warsaw.",
                    "Kartka jest szukana po miesiącu+dniu (bez roku) w tabeli calendar__card.",
                    "Locale jest ustawione na pl-PL, zwracane są tylko aktywne wpisy (status_id=1).",
                    "Jeśli brak wpisu dla danej daty – pole \"card\" ma wartość null."
                ],
                "example": "https://api.dobruk.pl/daycard.php?date=2025-12-10",
                "example_response": {
                    "ok": true,
                    "date": "2025-12-10",
                    "offset": 0,
                    "pretty_date": "środa, 10 grudnia 2025",
                    "week_no": 50,
                    "day_of_year": 344,
                    "days_in_year": 365,
                    "is_today": true,
                    "card": {
                        "title": "...",
                        "lead": "...",
                        "names": "...",
                        "events": [
                            "...",
                            "..."
                        ],
                        "astro": [
                            "...",
                            "..."
                        ]
                    }
                }
            },
            {
                "path": "/woc/opub/decode.php",
                "methods": [
                    "GET"
                ],
                "description_en": "WhatsOnChain Data Plugin webhook for OPUB / NFT.* payloads. It detects OPUB-like content (e.g., type=nft.article) and returns an HTML viewer.",
                "description_pl": "Webhook dla pluginu Data na WhatsOnChain (OPUB / NFT.*). Wykrywa treści OPUB-like (np. type=nft.article) i zwraca HTML viewer.",
                "parameters": [
                    {
                        "name": "network",
                        "in": "query",
                        "required": true,
                        "type": "string",
                        "format": "main|test|stn",
                        "description_en": "Network name provided by WhatsOnChain placeholder {network}.",
                        "description_pl": "Nazwa sieci z placeholdera WhatsOnChain {network}."
                    },
                    {
                        "name": "tx",
                        "in": "query",
                        "required": true,
                        "type": "string",
                        "format": "txid (64 hex)",
                        "description_en": "Transaction id provided by WhatsOnChain placeholder {tx}.",
                        "description_pl": "TXID z placeholdera WhatsOnChain {tx}."
                    },
                    {
                        "name": "voutindex",
                        "in": "query",
                        "required": true,
                        "type": "int",
                        "format": ">=0",
                        "description_en": "Output index provided by WhatsOnChain placeholder {voutindex}.",
                        "description_pl": "Indeks vout z placeholdera WhatsOnChain {voutindex}."
                    },
                    {
                        "name": "view",
                        "in": "query",
                        "required": false,
                        "type": "string",
                        "format": "debug",
                        "description_en": "Optional. If set to \"debug\", the endpoint can show raw OP_RETURN chunks for troubleshooting.",
                        "description_pl": "Opcjonalne. Jeśli ustawisz \"debug\", endpoint może pokazać surowe chunki OP_RETURN (diagnostyka)."
                    }
                ],
                "notes_en": [
                    "Designed to be called by WhatsOnChain plugin system.",
                    "Returns HTML (viewer)."
                ],
                "notes_pl": [
                    "Endpoint projektowany pod system pluginów WhatsOnChain.",
                    "Zwraca HTML (viewer)."
                ],
                "example": "https://api.dobruk.pl/woc/opub/decode.php?network=main&tx=70c36d3a482bdc7c60ef0fd5bb90a5beaefe68824025d1947acc15ad1a14b284&voutindex=0"
            },
            {
                "path": "/opub/index.php",
                "methods": [
                    "GET"
                ],
                "description_en": "OPUB/1.1 gateway routes (proxy layer). Includes tx/list/mint/media/engagement endpoints.",
                "description_pl": "Trasy bramki OPUB/1.1 (warstwa proxy). Zawiera endpointy tx/list/mint/media/engagement.",
                "notes_en": [
                    "Configure upstream target with OPUB_UPSTREAM_BASE env var.",
                    "Core examples: /opub/tx.php?txid={txid}, /opub/list.php, /opub/mint.php (POST JSON).",
                    "Media stream examples: /opub/video-stream.php?txid={txid}, /opub/audio-stream.php?txid={txid}."
                ],
                "notes_pl": [
                    "Adres upstream ustawisz przez zmiennÄ… Å›rodowiskowÄ… OPUB_UPSTREAM_BASE.",
                    "PrzykÅ‚ady core: /opub/tx.php?txid={txid}, /opub/list.php, /opub/mint.php (POST JSON).",
                    "PrzykÅ‚ady streamingu: /opub/video-stream.php?txid={txid}, /opub/audio-stream.php?txid={txid}."
                ],
                "example": "https://api.dobruk.pl/opub/index.php"
            },
            {
                "path": "/healthz.php",
                "methods": [
                    "GET"
                ],
                "description_en": "Simple health check endpoint (optional).",
                "description_pl": "Prosty endpoint „żyje / działa” (opcjonalny).",
                "example": "https://api.dobruk.pl/healthz.php"
            }
        ]
    }
}