Repository navigation
ESPN: surface per-team waiver priority rank in league/standings/team reads - #178
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/leagueteam entries (and standings / team / snapshot reads, which sharelogic._slim_team) now carrywaiver_rank— each team's current waiver priority — so claim-or-wait decisions can see where a team sits in the order.Discovery note
The rank is per-team state, not a setting (it is not in the
acquisitionSettingsblock surfaced in #177). No fixture or recorded payload sample in this repo carries a per-team waiver field — a repo-wide search forwaiverRank/currentWaiverRank/ waiver-priority keys across tests, fixtures, and payload samples came up empty. The read is therefore defensive, in the module's usual style:_waiver_rank(team)trieswaiverRank(canonical), thencurrentWaiverRank, thenwaiver_rank, accepting only plain ints; anything else (or absence) degrades toNone.If the live payload uses yet another key, every team will read
nullafter deploy and the key list can be extended in a follow-up — the shape consumers see does not change.Tests
test_get_league_waiver_rank_parsed: teams carryingwaiverRank/currentWaiverRankparse to the exact values; a team without the field readsNone; pre-existing keys asserted untouched.test_get_league_waiver_rank_absent_is_none: the default fixture (no waiver fields) yieldsNoneon all teams.Read-only; no new endpoints; no migration; every existing response key unchanged.