The date and method of each player's acquisition onto a fantasy roster.

player_acquire(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 of roster players with acquisition method and date.

Examples

player_acquire(leagueId = "42654852")
#> $AUS
#> # A tibble: 16 × 12
#>    seasonId scoringPeriodId teamId lineupSlot playerId firstName lastName 
#>       <int>           <int>  <int> <fct>         <int> <chr>     <chr>    
#>  1     2024               1      1 QB          3139477 Patrick   Mahomes  
#>  2     2024               1      1 RB          3117251 Christian McCaffrey
#>  3     2024               1      1 RB          4242335 Jonathan  Taylor   
#>  4     2024               1      1 WR          3116406 Tyreek    Hill     
#>  5     2024               1      1 WR          4361370 Chris     Olave    
#>  6     2024               1      1 TE            15847 Travis    Kelce    
#>  7     2024               1      1 FLEX        4361529 Isiah     Pacheco  
#>  8     2024               1      1 D/ST         -16005 Browns    D/ST     
#>  9     2024               1      1 K           2971573 Ka'imi    Fairbairn
#> 10     2024               1      1 BE          3116385 Joe       Mixon    
#> 11     2024               1      1 BE          4047650 DK        Metcalf  
#> 12     2024               1      1 BE          3054850 Alvin     Kamara   
#> 13     2024               1      1 BE          4241478 DeVonta   Smith    
#> 14     2024               1      1 BE          4595348 Malik     Nabers   
#> 15     2024               1      1 BE          4569173 Rhamondre Stevenson
#> 16     2024               1      1 BE          4239993 Tee       Higgins  
#> # ℹ 5 more variables: proTeam <fct>, position <fct>, acquisitionType <chr>,
#> #   acquisitionDate <dttm>, onTeamId <fct>
#> 
#> $BOS
#> # A tibble: 16 × 12
#>    seasonId scoringPeriodId teamId lineupSlot playerId firstName lastName  
#>       <int>           <int>  <int> <fct>         <int> <chr>     <chr>     
#>  1     2024               1      2 QB          4429084 Anthony   Richardson
#>  2     2024               1      2 RB          4430737 Kyren     Williams  
#>  3     2024               1      2 RB          3043078 Derrick   Henry     
#>  4     2024               1      2 WR          4241389 CeeDee    Lamb      
#>  5     2024               1      2 WR          4362628 Ja'Marr   Chase     
#>  6     2024               1      2 TE          4430027 Sam       LaPorta   
#>  7     2024               1      2 FLEX        4047646 A.J.      Brown     
#>  8     2024               1      2 D/ST         -16006 Cowboys   D/ST      
#>  9     2024               1      2 K           3953687 Brandon   Aubrey    
#> 10     2024               1      2 BE          4426502 Drake     London    
#> 11     2024               1      2 BE          4697815 Rachaad   White     
#> 12     2024               1      2 BE          2976212 Stefon    Diggs     
#> 13     2024               1      2 BE          3915416 DJ        Moore     
#> 14     2024               1      2 BE          3126486 Deebo     Samuel Sr.
#> 15     2024               1      2 BE          3916387 Lamar     Jackson   
#> 16     2024               1      2 BE          4366031 Tank      Dell      
#> # ℹ 5 more variables: proTeam <fct>, position <fct>, acquisitionType <chr>,
#> #   acquisitionDate <dttm>, onTeamId <fct>
#> 
#> $CHI
#> # A tibble: 16 × 12
#>    seasonId scoringPeriodId teamId lineupSlot playerId firstName lastName    
#>       <int>           <int>  <int> <fct>         <int> <chr>     <chr>       
#>  1     2024               1      3 QB          3918298 Josh      Allen       
#>  2     2024               1      3 RB          4430807 Bijan     Robinson    
#>  3     2024               1      3 RB          4239996 Travis    Etienne Jr. 
#>  4     2024               1      3 WR          4262921 Justin    Jefferson   
#>  5     2024               1      3 WR          4569618 Garrett   Wilson      
#>  6     2024               1      3 TE          3116365 Mark      Andrews     
#>  7     2024               1      3 FLEX        4426515 Puka      Nacua       
#>  8     2024               1      3 D/ST         -16033 Ravens    D/ST        
#>  9     2024               1      3 K             15683 Justin    Tucker      
#> 10     2024               1      3 BE          4432708 Marvin    Harrison Jr.
#> 11     2024               1      3 BE          4429160 De'Von    Achane      
#> 12     2024               1      3 BE          4258173 Nico      Collins     
#> 13     2024               1      3 BE          4360438 Brandon   Aiyuk       
#> 14     2024               1      3 BE          4567048 Kenneth   Walker III  
#> 15     2024               1      3 BE          3042519 Aaron     Jones       
#> 16     2024               1      3 BE          4429615 Zay       Flowers     
#> # ℹ 5 more variables: proTeam <fct>, position <fct>, acquisitionType <chr>,
#> #   acquisitionDate <dttm>, onTeamId <fct>
#> 
#> $DEN
#> # A tibble: 16 × 12
#>    seasonId scoringPeriodId teamId lineupSlot playerId firstName lastName   
#>       <int>           <int>  <int> <fct>         <int> <chr>     <chr>      
#>  1     2024               1      4 QB          4040715 Jalen     Hurts      
#>  2     2024               1      4 RB          4427366 Breece    Hall       
#>  3     2024               1      4 RB          3929630 Saquon    Barkley    
#>  4     2024               1      4 WR          4374302 Amon-Ra   St. Brown  
#>  5     2024               1      4 WR          4035687 Michael   Pittman Jr.
#>  6     2024               1      4 TE          4361307 Trey      McBride    
#>  7     2024               1      4 FLEX        4429795 Jahmyr    Gibbs      
#>  8     2024               1      4 D/ST         -16025 49ers     D/ST       
#>  9     2024               1      4 K           3050478 Jake      Elliott    
#> 10     2024               1      4 BE            16800 Davante   Adams      
#> 11     2024               1      4 BE          4379399 James     Cook       
#> 12     2024               1      4 BE            16737 Mike      Evans      
#> 13     2024               1      4 BE          4047365 Josh      Jacobs     
#> 14     2024               1      4 BE          4372016 Jaylen    Waddle     
#> 15     2024               1      4 BE          2977187 Cooper    Kupp       
#> 16     2024               1      4 BE          3925357 Calvin    Ridley     
#> # ℹ 5 more variables: proTeam <fct>, position <fct>, acquisitionType <chr>,
#> #   acquisitionDate <dttm>, onTeamId <fct>
#>