The teams in a league and their owners.

league_teams(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 dataframe (or list) with league teams.

Details

If any team has multiple owners, the memberId column will be a list of unique owner member ID strings per team (see league_members()).

Examples

league_teams(leagueId = "42654852")
#> # A tibble: 4 × 6
#>   teamId abbrev name              logo                         logoType memberId
#>    <int> <fct>  <chr>             <chr>                        <chr>    <chr>   
#> 1      1 AUS    Austin Astronauts https://g.espncdn.com/lm-st… VECTOR   {22DFE7…
#> 2      2 BOS    Boston Buzzards   https://g.espncdn.com/lm-st… VECTOR   {22DFE7…
#> 3      3 CHI    Chicago Crowns    https://g.espncdn.com/lm-st… VECTOR   {22DFE7…
#> 4      4 DEN    Denver Devils     https://g.espncdn.com/lm-st… VECTOR   {22DFE7…