The individual proposed and executed transactions, trades, and waiver moves.

recent_activity(
  leagueId = ffl_id(),
  leagueHistory = FALSE,
  scoringPeriodId = NULL,
  ...
)

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.

scoringPeriodId

Integer week of NFL season. By default, NULL will use the current week (see ffl_week()). Scoring periods are always one week in length, whereas matchups might be longer.

...

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

Value

A data frame of transactions and roster moves.

Details

As of November 2021, activity data related to trades coming from the API is flawed. The items list column containing the players involved in a trade will only contain data for rejected trades (with an executionType of "CANCEL"). For accepted and upheld trades, that items element is NULL or an empty list. This flaw comes from the API itself, not processing done by this package.

See also

Examples

recent_activity(leagueId = "42654852", scoringPeriodId = 2)
#> # A tibble: 64 × 14
#>    bidAmount executionType id      isActingAsTeamOwner isLeagueManager isPending
#>        <int> <chr>         <chr>   <lgl>               <lgl>           <lgl>    
#>  1         0 EXECUTE       905f81… FALSE               FALSE           FALSE    
#>  2         0 EXECUTE       f007e4… FALSE               FALSE           FALSE    
#>  3         0 EXECUTE       926243… FALSE               FALSE           FALSE    
#>  4         0 EXECUTE       2e2236… FALSE               FALSE           FALSE    
#>  5         0 EXECUTE       8f7f25… FALSE               FALSE           FALSE    
#>  6         0 EXECUTE       6a934b… FALSE               FALSE           FALSE    
#>  7         0 EXECUTE       1e7ea9… FALSE               FALSE           FALSE    
#>  8         0 EXECUTE       3b3d98… FALSE               FALSE           FALSE    
#>  9         0 EXECUTE       f7b5d8… FALSE               FALSE           FALSE    
#> 10         0 EXECUTE       6956e4… FALSE               FALSE           FALSE    
#> # ℹ 54 more rows
#> # ℹ 8 more variables: items <list>, proposedDate <dttm>, scoringPeriodId <int>,
#> #   skipTransactionCounters <lgl>, status <chr>, teamId <int>, type <chr>,
#> #   processDate <dttm>