ff_schedule: Get Schedule

View source: R/0_generics.R

ff_scheduleR Documentation

Get Schedule

Description

This function returns a tidy dataframe with one row for every team for every weekly matchup

Usage

ff_schedule(conn, ...)

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

## S3 method for class 'flea_conn'
ff_schedule(conn, week = 1:17, ...)

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

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

Arguments

conn

a conn object created by ff_connect()

...

for other platforms

week

a numeric or numeric vector specifying which weeks to pull

Value

A tidy dataframe with one row per game per franchise per week

Methods (by class)

  • ff_schedule(espn_conn): ESPN: returns schedule data, one row for every franchise for every week. Completed games have result data.

  • ff_schedule(flea_conn): Flea: returns schedule data, one row for every franchise for every week. Completed games have result data.

  • ff_schedule(mfl_conn): MFL: returns schedule data, one row for every franchise for every week. Completed games have result data.

  • ff_schedule(sleeper_conn): Sleeper: returns all schedule data

Examples


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



try({ # try only shown here because sometimes CRAN checks are weird
  conn <- fleaflicker_connect(season = 2019, league_id = 206154)
  ff_schedule(conn, week = 2:4)
}) # 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_schedule(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_schedule(jml_conn)
}) # end try



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