ff_rosters: Get League Rosters

View source: R/0_generics.R

ff_rostersR Documentation

Get League Rosters

Description

This function returns a tidy dataframe of team rosters

Usage

ff_rosters(conn, ...)

## S3 method for class 'espn_conn'
ff_rosters(conn, week = NULL, ...)

## S3 method for class 'flea_conn'
ff_rosters(conn, ...)

## S3 method for class 'mfl_conn'
ff_rosters(conn, custom_players = deprecated(), week = NULL, ...)

## S3 method for class 'sleeper_conn'
ff_rosters(conn, ...)

Arguments

conn

a conn object created by ff_connect()

...

arguments passed to other methods (currently none)

week

a numeric that specifies which week to return

custom_players

"[Deprecated]" - now returns custom players by default

Value

A tidy dataframe of rosters, joined to basic player information and basic franchise information

Methods (by class)

  • ff_rosters(espn_conn): ESPN: Returns all roster data.

  • ff_rosters(flea_conn): Fleaflicker: Returns roster data (minus age as of right now)

  • ff_rosters(mfl_conn): MFL: returns roster data

  • ff_rosters(sleeper_conn): Sleeper: Returns all roster data.

Examples


try({ # try only shown here because sometimes CRAN checks are weird
  conn <- espn_connect(season = 2020, league_id = 899513)
  ff_league(conn)
}) # end try


try({ # try only shown here because sometimes CRAN checks are weird
  joe_conn <- ff_connect(platform = "fleaflicker", league_id = 312861, season = 2020)

  ff_rosters(joe_conn)
}) # end try


try({ # try only shown here because sometimes CRAN checks are weird
  ssb_conn <- ff_connect(platform = "mfl", league_id = 54040, season = 2020)
  ff_rosters(ssb_conn)
}) # end try



try({ # try only shown here because sometimes CRAN checks are weird
  jml_conn <- ff_connect(platform = "sleeper", league_id = "522458773317046272", season = 2020)
  ff_rosters(jml_conn)
}) # end try


ffscrapr documentation built on Feb. 16, 2023, 10:55 p.m.