{
 "openapi": "3.1.0",
 "info": {
  "title": "Cesta za bydlením: otevřené API",
  "version": "1.0.0",
  "description": "Statické read-only API nad obsahem webu o stavbě rodinného domu svépomocí: díly seriálu (videa s kapitolami a shrnutím), témata, články a slovník. Data se generují při každém nasazení webu. Citujte prosím s odkazem na zdrojovou stránku.",
  "contact": {
   "url": "https://cestazabydlenim.cz/kontakt/"
  },
  "license": {
   "name": "Citace s uvedením zdroje",
   "url": "https://cestazabydlenim.cz/api/"
  }
 },
 "servers": [
  {
   "url": "https://cestazabydlenim.cz"
  }
 ],
 "paths": {
  "/api/dily.json": {
   "get": {
    "summary": "Všechny díly seriálu",
    "operationId": "listEpisodes",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "count": {
           "type": "integer"
          },
          "items": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string",
              "description": "YouTube video ID"
             },
             "url": {
              "type": "string"
             },
             "markdown": {
              "type": [
               "string",
               "null"
              ]
             },
             "youtube": {
              "type": "string"
             },
             "title": {
              "type": "string"
             },
             "episode": {
              "type": [
               "integer",
               "null"
              ]
             },
             "published": {
              "type": [
               "string",
               "null"
              ],
              "format": "date"
             },
             "duration_s": {
              "type": [
               "integer",
               "null"
              ]
             },
             "views": {
              "type": [
               "integer",
               "null"
              ]
             },
             "access": {
              "enum": [
               "verejne",
               "clenske"
              ]
             },
             "topics": {
              "type": "array",
              "items": {
               "type": "string"
              }
             },
             "summary": {
              "type": [
               "string",
               "null"
              ]
             },
             "questions": {
              "type": "array",
              "items": {
               "type": "string"
              }
             },
             "has_article": {
              "type": "boolean"
             },
             "chapters": {
              "type": "array",
              "items": {
               "type": "object",
               "properties": {
                "time": {
                 "type": "string"
                },
                "seconds": {
                 "type": "integer"
                },
                "title": {
                 "type": "string"
                },
                "url": {
                 "type": "string"
                }
               }
              }
             },
             "key_points": {
              "type": "array",
              "items": {
               "type": "string"
              }
             },
             "materials": {
              "type": "array",
              "items": {
               "type": "string"
              }
             },
             "tools": {
              "type": "array",
              "items": {
               "type": "string"
              }
             }
            }
           }
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/dily/{slug}.json": {
   "get": {
    "summary": "Detail dílu",
    "operationId": "getEpisode",
    "parameters": [
     {
      "name": "slug",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      },
      "example": "sokl-svisla-hydroizolace-a-zatepleni"
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string",
           "description": "YouTube video ID"
          },
          "url": {
           "type": "string"
          },
          "markdown": {
           "type": [
            "string",
            "null"
           ]
          },
          "youtube": {
           "type": "string"
          },
          "title": {
           "type": "string"
          },
          "episode": {
           "type": [
            "integer",
            "null"
           ]
          },
          "published": {
           "type": [
            "string",
            "null"
           ],
           "format": "date"
          },
          "duration_s": {
           "type": [
            "integer",
            "null"
           ]
          },
          "views": {
           "type": [
            "integer",
            "null"
           ]
          },
          "access": {
           "enum": [
            "verejne",
            "clenske"
           ]
          },
          "topics": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "summary": {
           "type": [
            "string",
            "null"
           ]
          },
          "questions": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "has_article": {
           "type": "boolean"
          },
          "chapters": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "time": {
              "type": "string"
             },
             "seconds": {
              "type": "integer"
             },
             "title": {
              "type": "string"
             },
             "url": {
              "type": "string"
             }
            }
           }
          },
          "key_points": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "materials": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "tools": {
           "type": "array",
           "items": {
            "type": "string"
           }
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/videa.json": {
   "get": {
    "summary": "Všechna videa včetně shorts",
    "operationId": "listVideos",
    "responses": {
     "200": {
      "description": "OK"
     }
    }
   }
  },
  "/api/temata.json": {
   "get": {
    "summary": "Strom témat (etapy a průřezová témata)",
    "operationId": "listTopics",
    "responses": {
     "200": {
      "description": "OK"
     }
    }
   }
  },
  "/api/clanky.json": {
   "get": {
    "summary": "Články",
    "operationId": "listArticles",
    "responses": {
     "200": {
      "description": "OK"
     }
    }
   }
  },
  "/api/kapitoly.json": {
   "get": {
    "summary": "Všechny kapitoly všech dílů s odkazem na přesný čas ve videu",
    "operationId": "listChapters",
    "responses": {
     "200": {
      "description": "OK"
     }
    }
   }
  },
  "/api/slovnik.json": {
   "get": {
    "summary": "Slovník pojmů",
    "operationId": "listGlossary",
    "responses": {
     "200": {
      "description": "OK"
     }
    }
   }
  }
 }
}