Kerikim commited on
Commit
6417329
·
1 Parent(s): b612910
Files changed (1) hide show
  1. utils/api.py +13 -0
utils/api.py CHANGED
@@ -398,3 +398,16 @@ def submit_practice_quiz(lesson: str, responses: dict):
398
  def send_to_chatbot(messages: list[dict]):
399
  return _json_or_raise(_req("POST", "/chatbot", json={"messages": messages}))
400
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
398
  def send_to_chatbot(messages: list[dict]):
399
  return _json_or_raise(_req("POST", "/chatbot", json={"messages": messages}))
400
 
401
+
402
+ # --- Game API helpers ---
403
+
404
+ def record_money_match_play(user_id: int, target: int, total: int,
405
+ elapsed_ms: int, matched: bool, gained_xp: int):
406
+ return _req("POST", "/games/money_match/record", json={
407
+ "user_id": user_id,
408
+ "target": target,
409
+ "total": total,
410
+ "elapsed_ms": elapsed_ms,
411
+ "matched": matched,
412
+ "gained_xp": gained_xp,
413
+ }).json()