Skip to content

ESPN: surface league acquisition/waiver settings in league read - #177

Merged
warnerktsang merged 2 commits into
mainfrom
espn-league-acquisition-settings
Oct 30, 2026
Merged

warnerktsang merged 2 commits into
mainfrom
espn-league-acquisition-settings

Conversation

@warnerktsang

Copy link
Copy Markdown
Collaborator

What

GET /espn/league now carries an acquisition_settings key so waiver-strategy decisions (is there a per-matchup add cap? FAAB or plain waivers? minimum bid?) can be made from the league read instead of guessing.

Change

  • backend/espn/logic.py: get_league returns a new acquisition_settings dict parsed defensively from the settings payload's acquisitionSettings block — acquisition_limit (per matchup period; -1 = unlimited), acquisition_type, acquisition_budget, is_using_acquisition_budget, minimum_bid, waiver_hours, waiver_order_reset — plus trade_deadline from tradeSettings.deadlineDate. Every field is None when ESPN omits it (or the whole block), matching the module's .get()-based parsing style. All existing keys unchanged.
  • backend/tests/test_espn_logic.py: two new tests — full block parses to the expected dict (and pre-existing keys are untouched); absent block yields all-None fields.

Read-only: no new endpoints, no schema/migration. The connector CLI's league verb emits the response generically, so no CLI change was needed; docs/espn.md describes the route as 'League settings + team list' without enumerating fields, so no docs change either.

Tests

ESPN scope locally: 527 passed (525 baseline at #176 + 2 new).

@warnerktsang
warnerktsang merged commit 0045e5f into main Oct 30, 2026
9 checks passed
@warnerktsang
warnerktsang deleted the espn-league-acquisition-settings branch October 30, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant