{"openapi":"3.1.0","info":{"title":"kbs0830.com public API","version":"1.0.0","description":"PINGWEI LI 個人網站的公開唯讀 API：作品、文章、現況、飛行紀錄統計。內容跟網站頁面同一份資料，不需要金鑰，任何網域都可以讀（CORS *）。","contact":{"url":"https://kbs0830.com/developers"}},"servers":[{"url":"https://kbs0830.com/api/v1"}],"paths":{"/profile":{"get":{"summary":"個人簡介","operationId":"getProfile","responses":{"200":{"description":"簡介","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Profile"}}}}}}},"/projects":{"get":{"summary":"全部作品","operationId":"listProjects","responses":{"200":{"description":"作品清單","content":{"application/json":{"schema":{"type":"object","required":["projects"],"properties":{"projects":{"type":"array","items":{"$ref":"#/components/schemas/Project"}}}}}}}}}},"/projects/{slug}":{"get":{"summary":"單一作品（含詳細說明）","operationId":"getProject","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"作品","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectDetail"}}}},"404":{"description":"找不到這個 slug","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/posts":{"get":{"summary":"全部文章（不含全文）","operationId":"listPosts","responses":{"200":{"description":"文章清單","content":{"application/json":{"schema":{"type":"object","required":["posts"],"properties":{"posts":{"type":"array","items":{"$ref":"#/components/schemas/Post"}}}}}}}}}},"/posts/{slug}":{"get":{"summary":"單篇文章（含全文）","operationId":"getPost","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"文章","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostFull"}}}},"404":{"description":"找不到這個 slug","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/now":{"get":{"summary":"現在在做什麼","operationId":"getNow","responses":{"200":{"description":"現況","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Now"}}}}}}},"/flights":{"get":{"summary":"飛行紀錄統計（沒有日期）","operationId":"getFlights","responses":{"200":{"description":"統計","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Flights"}}}}}}}},"components":{"schemas":{"Project":{"type":"object","required":["slug","title","titleZh","description","descriptionZh","highlightZh","tags","status","kind","url","github"],"properties":{"slug":{"type":"string"},"title":{"type":"string"},"titleZh":{"type":"string"},"description":{"type":"string"},"descriptionZh":{"type":"string"},"highlightZh":{"type":"string","description":"一句話成果"},"tags":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["完成","製作中","學習記錄","課程專題"]},"kind":{"type":"string","enum":["personal","course"]},"url":{"type":"string","format":"uri"},"github":{"type":["string","null"]}}},"ProjectDetail":{"allOf":[{"$ref":"#/components/schemas/Project"},{"type":"object","required":["intro","sections","context","image"],"properties":{"intro":{"type":["string","null"]},"sections":{"type":"array","items":{"type":"object","required":["heading","headingEn","items"],"properties":{"heading":{"type":"string"},"headingEn":{"type":["string","null"]},"items":{"type":"array","items":{"type":"string"}}}}},"context":{"type":["string","null"]},"image":{"type":["string","null"]}}}]},"Post":{"type":"object","required":["slug","title","titleEn","date","description","tags","series","readingMinutes","url","markdownUrl"],"properties":{"slug":{"type":"string"},"title":{"type":"string"},"titleEn":{"type":"string"},"date":{"type":"string","format":"date"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"series":{"type":["string","null"]},"readingMinutes":{"type":"integer"},"url":{"type":"string","format":"uri"},"markdownUrl":{"type":"string","format":"uri"}}},"PostFull":{"allOf":[{"$ref":"#/components/schemas/Post"},{"type":"object","required":["content"],"properties":{"content":{"type":"string","description":"文章 MDX 原文"}}}]},"Profile":{"type":"object","required":["name","role","base","focus","status","links"],"properties":{"name":{"type":"string"},"role":{"type":"string"},"base":{"type":"string"},"focus":{"type":"array","items":{"type":"string"}},"status":{"type":"array","items":{"type":"string"}},"links":{"type":"object","additionalProperties":{"type":"string"}}}},"Now":{"type":"object","required":["items","url"],"properties":{"items":{"type":"array","items":{"type":"string"}},"url":{"type":"string"}}},"Flights":{"type":"object","required":["flights","airports","countries","km","earthLaps","airlines","routes","url"],"properties":{"flights":{"type":"integer"},"airports":{"type":"integer"},"countries":{"type":"integer"},"km":{"type":"integer"},"earthLaps":{"type":"number"},"airlines":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"flights":{"type":"integer"}}}},"routes":{"type":"array","items":{"type":"object","properties":{"from":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}}},"to":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}}},"km":{"type":"integer"},"count":{"type":"integer"},"flightCodes":{"type":"array","items":{"type":"string"}}}}},"url":{"type":"string"}}}}}}