cwadayi commited on
Commit
2cce2ac
·
verified ·
1 Parent(s): 31e4eea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -15,7 +15,7 @@ logging.basicConfig(level=logging.INFO)
15
  # --- 初始化 FastAPI 應用 ---
16
  app = FastAPI(
17
  title="台灣地震速報 API",
18
- description="一個從台灣中央氣象署(CWA)公開預警XML Feed中,擷取最新地震速報的API。",
19
  version="1.0.0",
20
  )
21
 
@@ -117,14 +117,16 @@ def root():
117
  return {
118
  "message": "歡迎使用台灣地震速報 API",
119
  "documentation": "/docs",
120
- "earthquake_feed_endpoint": "/cwa-earthquakes"
 
 
121
  }
122
 
123
  @app.get("/cwa-earthquakes")
124
  async def get_earthquakes_endpoint():
125
  """
126
  提供最新的地震速報。
127
-
128
  此端點會從 CWA 的公開預警 Feed 中擷取資料,
129
  篩選出來自「中央氣象署」的「地震速報」,
130
  並以 JSON 格式回傳。
 
15
  # --- 初始化 FastAPI 應用 ---
16
  app = FastAPI(
17
  title="台灣地震速報 API",
18
+ description="一個從台灣中央氣象署(CWA)公開預警XML Feed中,擷取最新地震速報的API。https://cwadayi-app-show-pws.hf.space/cwa-earthquakes",
19
  version="1.0.0",
20
  )
21
 
 
117
  return {
118
  "message": "歡迎使用台灣地震速報 API",
119
  "documentation": "/docs",
120
+ "earthquake_feed_endpoint": "/cwa-earthquakes",
121
+ "https://cwadayi-app-show-pws.hf.space/cwa-earthquakes",
122
+ "https://cwadayi-app-show-pws.hf.space/docs"
123
  }
124
 
125
  @app.get("/cwa-earthquakes")
126
  async def get_earthquakes_endpoint():
127
  """
128
  提供最新的地震速報。
129
+ https://cwadayi-app-show-pws.hf.space/cwa-earthquakes
130
  此端點會從 CWA 的公開預警 Feed 中擷取資料,
131
  篩選出來自「中央氣象署」的「地震速報」,
132
  並以 JSON 格式回傳。