paper-dynasty-database/app
Cal Corum 0b5d0b474b feat: add GET /api/v2/refractor/cards list endpoint (#172)
Closes #172

- New GET /api/v2/refractor/cards endpoint in refractor router with
  team_id (required), card_type, tier, season, progress, limit, offset filters
- season filter uses EXISTS subquery against batting/pitching_season_stats
- progress=close filter uses CASE expression to compare current_value
  against next tier threshold (>= 80%)
- LEFT JOIN on Player so deleted players return player_name: null
- Sorting: current_tier DESC, current_value DESC
- count reflects total matching rows before pagination
- Extended _build_card_state_response() with progress_pct (computed) and
  optional player_name; single-card endpoint gains progress_pct automatically
- Added non-unique team_id index on refractor_card_state in db_engine.py
- Migration: 2026-03-25_add_refractor_card_state_team_index.sql
- Removed pre-existing unused RefractorTrack import in evaluate_game (ruff)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 01:35:18 -05:00
..
models refactor: split PlayerSeasonStats into BattingSeasonStats and PitchingSeasonStats 2026-03-17 09:43:22 -05:00
routers_v2 feat: add GET /api/v2/refractor/cards list endpoint (#172) 2026-03-25 01:35:18 -05:00
seed refactor: rename evolution system to refractor 2026-03-23 13:31:55 -05:00
services fix: complete remaining evolution→refractor renames from review 2026-03-23 14:17:03 -05:00
__init__.py Initial Commit with /current 2023-09-13 14:44:26 -05:00
card_creation.py Update card_creation.py 2024-02-24 21:36:44 -06:00
db_engine.py feat: add GET /api/v2/refractor/cards list endpoint (#172) 2026-03-25 01:35:18 -05:00
db_helpers.py Fix PostgreSQL upsert column names and CSV null handling 2026-01-30 17:28:40 -06:00
dependencies.py fix: use constant-time comparison for bearer token validation (#8) 2026-03-05 03:43:59 +00:00
main.py refactor: rename evolution system to refractor 2026-03-23 13:31:55 -05:00
player_scouting.py Update player_scouting.py 2023-09-24 19:00:21 -05:00