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,27 @@
|
||||
"""One-off: enrich a player profile (no secrets printed)."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
sys.path.insert(0, str(ROOT))
|
||||
sys.path.insert(0, str(ROOT / "pc"))
|
||||
|
||||
from player_pages import enrich_profile_recent # noqa: E402
|
||||
|
||||
AID = int(sys.argv[1]) if len(sys.argv) > 1 else 143712136
|
||||
cfg = json.loads((ROOT / "pc" / "config.json").read_text(encoding="utf-8"))
|
||||
p = enrich_profile_recent(cfg, AID, include_gsi=True)
|
||||
print(
|
||||
"name",
|
||||
p.get("personaname"),
|
||||
"rank",
|
||||
p.get("rank_tier"),
|
||||
"lb",
|
||||
p.get("leaderboard_rank"),
|
||||
"recent",
|
||||
len(p.get("recent") or []),
|
||||
)
|
||||
Reference in New Issue
Block a user