ffverse / ffscrapr

R API Client for Fantasy Football League Platforms
https://ffscrapr.ffverse.com
Other
76 stars 21 forks source link

Sleeper ff_draftpicks does not detect/handle picks for a draft that is in progress. #386

Open tanho63 opened 1 year ago

tanho63 commented 1 year ago

Forking previous discussions from #352 and #361

ff_draftpicks is designed to return the following:

  • for the current-season, it should return the numeric-indexed picks (i.e. 1.01, 2.12, 3.01 etc) that have not yet been drafted (and should incorporate trades)
  • for future seasons, it should return future picks by round

Sleeper used to make the former available but now only makes it available if the league is actively drafting - otherwise it only makes the traded picks available and (sometimes) a draft order.

To recreate the previous functionality, I envision sleeper_draftpicks to need to do:

  • check status of draft and whether a draft order is available.
  • if draft order is not avail, treat as future picks
  • if draft order is avail, build pick order from draft order and draft type then apply pick trades, if any.
  • then run ff_draft and see if there's any selected picks to remove
  • then bind onto the existing future drafts