cwendt94 / espn-api

ESPN Fantasy API! (Football, Basketball)
MIT License
544 stars 183 forks source link

feat: Add `previousSeasons` to `BaseLeague` object #509

Closed DesiPilla closed 7 months ago

DesiPilla commented 7 months ago

Add a list of all previous seasons for a league. I know this is accurate for football leagues, and I assume(?) this is the same across all ESPN leagues and should be a part of the BaseLeague object.

codecov-commenter commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (cff22b5) 80.57% compared to head (8f9a834) 80.58%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #509 +/- ## ======================================= Coverage 80.57% 80.58% ======================================= Files 59 59 Lines 2111 2112 +1 ======================================= + Hits 1701 1702 +1 Misses 410 410 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

DesiPilla commented 7 months ago

An interesting note about ESPN's API on this matter:

Say you have a league that has been around since 2017.

DesiPilla commented 7 months ago

Updated the PR to only include seasons prior to the one being queried.

DesiPilla commented 7 months ago

@cwendt94 this PR is ready to be merged.