Return the sequential result of a fantasy draft pick, whether snake or salary cap format.

draft_recap(leagueId = ffl_id(), leagueHistory = FALSE, ...)

Arguments

leagueId

Numeric league ID or ESPN fantasy page URL. Defaults to getOption("fflr.leagueId"). Function fails if no ID is found.

leagueHistory

logical; Should the leagueHistory version of the API be called? If TRUE, a list of results is returned, with one element for each historical year of the league.

...

Additional queries passed to httr::GET(). Arguments are converted to a named list and passed to query alongside view.

Value

A data frame(s) of draft picks.

Examples

draft_recap(leagueId = "42654852")
#> # A tibble: 64 × 15
#>    seasonId autoDraftTypeId bidAmount pickId keeper lineupSlot nominatingTeamId
#>       <int>           <int>     <int>  <int> <lgl>  <fct>      <fct>           
#>  1     2024               1        NA      1 FALSE  RB         NA              
#>  2     2024               3        NA      2 FALSE  WR         NA              
#>  3     2024               3        NA      3 FALSE  RB         NA              
#>  4     2024               3        NA      4 FALSE  RB         NA              
#>  5     2024               1        NA      5 FALSE  WR         NA              
#>  6     2024               3        NA      6 FALSE  WR         NA              
#>  7     2024               3        NA      7 FALSE  WR         NA              
#>  8     2024               3        NA      8 FALSE  WR         NA              
#>  9     2024               1        NA      9 FALSE  RB         NA              
#> 10     2024               3        NA     10 FALSE  FLEX       NA              
#> # ℹ 54 more rows
#> # ℹ 8 more variables: overallPickNumber <int>, playerId <int>,
#> #   reservedForKeeper <lgl>, roundId <int>, roundPickNumber <int>,
#> #   teamId <int>, abbrev <fct>, tradeLocked <lgl>