Ship Steam login, D1 player sync, and cached「我」dashboard.
Players get a fast TTL-backed homepage (local profile / Cloudflare D1) with dense UI polish; login unlocks /home without blocking on every OpenDota refresh. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
"""Smoke-check STEAM_API_KEY / KEYZOO_ASSET_SECRET_WEB_API_KEY (no secret echo)."""
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import os
|
||||
import urllib.request
|
||||
|
||||
k = (os.environ.get("STEAM_API_KEY") or os.environ.get("KEYZOO_ASSET_SECRET_WEB_API_KEY") or "").strip()
|
||||
if not k:
|
||||
raise SystemExit("missing key")
|
||||
url = (
|
||||
"https://api.steampowered.com/ISteamUser/GetPlayerSummaries/v2/"
|
||||
f"?key={k}&steamids=76561198000000000"
|
||||
)
|
||||
with urllib.request.urlopen(url, timeout=20) as resp:
|
||||
data = json.loads(resp.read().decode())
|
||||
print("ok" if isinstance(data, dict) and "response" in data else "bad")
|
||||
Reference in New Issue
Block a user