Repository navigation
ESPN: surface league acquisition/waiver settings in league read - #177
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
GET /espn/leaguenow carries anacquisition_settingskey 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_leaguereturns a newacquisition_settingsdict parsed defensively from the settings payload'sacquisitionSettingsblock —acquisition_limit(per matchup period; -1 = unlimited),acquisition_type,acquisition_budget,is_using_acquisition_budget,minimum_bid,waiver_hours,waiver_order_reset— plustrade_deadlinefromtradeSettings.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
leagueverb 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).