ff_draftpicks: Get Draft Picks

View source: R/0_generics.R

ff_draftpicksR Documentation

Get Draft Picks

Description

Returns all draft picks (current and future) that belong to a specific franchise and have not yet been converted into players (i.e. selected.)

Usage

ff_draftpicks(conn, ...)

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

## S3 method for class 'flea_conn'
ff_draftpicks(conn, franchise_id = NULL, ...)

## S3 method for class 'mfl_conn'
ff_draftpicks(conn, ...)

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

Arguments

conn

the list object created by ff_connect()

...

other arguments (currently unused)

franchise_id

A list of franchise IDs to pull, if NULL will return all franchise IDs

Value

Returns a dataframe with current and future draft picks for each franchise

Methods (by class)

  • ff_draftpicks(espn_conn): ESPN: does not support future/draft pick trades - for draft results, please use ff_draft.

  • ff_draftpicks(flea_conn): Fleaflicker: retrieves current and future draft picks, potentially for a specified team.

  • ff_draftpicks(mfl_conn): MFL: returns current and future picks

  • ff_draftpicks(sleeper_conn): Sleeper: retrieves current and future draft picks

Examples


try({ # try only shown here because sometimes CRAN checks are weird
  conn <- espn_connect(
    season = 2018,
    league_id = 1178049,
    espn_s2 = Sys.getenv("TAN_ESPN_S2"),
    swid = Sys.getenv("TAN_SWID")
  )

  ff_draftpicks(conn)
}) # end try



try({ # try only shown here because sometimes CRAN checks are weird
  conn <- fleaflicker_connect(2020, 206154)
  ff_draftpicks(conn, franchise_id = 1373475)
}) # end try



try({ # try only shown here because sometimes CRAN checks are weird
  dlf_conn <- mfl_connect(2020, league_id = 37920)
  ff_draftpicks(conn = dlf_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_draftpicks(jml_conn)
}) # end try


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