ff_draft: Get Draft Results

View source: R/0_generics.R

ff_draftR Documentation

Get Draft Results

Description

This function gets a tidy dataframe of draft results for the current year. Can handle MFL devy drafts or startup drafts by specifying the custom_players argument

Usage

ff_draft(conn, ...)

## S3 method for class 'espn_conn'
ff_draft(conn, ...)

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

## S3 method for class 'mfl_conn'
ff_draft(conn, custom_players = deprecated(), ...)

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

Arguments

conn

a conn object created by ff_connect()

...

args for other methods

custom_players

[Deprecated] - now returns custom players by default

Value

A tidy dataframe of draft results

Methods (by class)

  • ff_draft(espn_conn): ESPN: returns the current year's draft/auction, including details on keepers

  • ff_draft(flea_conn): Fleaflicker: returns a table of drafts for the current year

  • ff_draft(mfl_conn): MFL: returns a table of drafts for the current year - can handle devy/startup-rookie-picks by specifying custom_players (slower!)

  • ff_draft(sleeper_conn): Sleeper: returns a dataframe of all drafts and draft selections, if available.

Examples


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



try({ # try only shown here because sometimes CRAN checks are weird
  conn <- fleaflicker_connect(season = 2020, league_id = 206154)
  ff_draft(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_draft(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_draft(jml_conn)
}) # end try



dynastyprocess/ffscrapr documentation built on June 4, 2024, 1 p.m.