Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix mfl starters bugs #203

Merged
merged 1 commit into from
Feb 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: ffscrapr
Title: API Client for Fantasy Football League Platforms
Version: 1.2.2.12
Version: 1.2.2.13
Authors@R:
c(person(given = "Tan",
family = "Ho",
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
- Fixed bug in MFL's `ff_playerscores()` function so that it correctly pulls older names. (#196, thanks for reporting Mike!) (v1.2.2.11)
- Actually export `dp_cleannames()` and add it to the NAMESPACE so it's accessible to the end user, whoops.
- Refactored all tests to move test cache files to a separate/non-package location (https://github.com/dynastyprocess/ffscrapr-tests) - so that it is not included in CRAN's package sizing (v1.2.2.12)
- Fixed bugs in MFL's `ff_starters()` function - bad default arg


# ffscrapr 1.2.2
Expand Down
5 changes: 1 addition & 4 deletions R/espn_league.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
#'
#' @examples
#' \donttest{
#' conn <- espn_connect(
#' season = 2020,
#' league_id = 899513
#' )
#' conn <- espn_connect(season = 2020, league_id = 899513)
#' ff_league(conn)
#' }
#'
Expand Down
8 changes: 4 additions & 4 deletions R/mfl_starters.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
#' @examples
#' \donttest{
#' dlf_conn <- mfl_connect(2020, league_id = 37920)
#' ff_starters(conn = dlf_conn, week = 1:2)
#' ff_starters(conn = dlf_conn)
#' }
#'
#' @export
ff_starters.mfl_conn <- function(conn, week = "all", season = NULL, ...) {
ff_starters.mfl_conn <- function(conn, week = 1:17, season = NULL, ...) {
if (is.null(season)) season <- conn$season

checkmate::assert_numeric(week, lower = 1, upper = 21)
checkmate::assert_number(week, lower = 1, upper = 21)
checkmate::assert_number(season)

players_endpoint <- sleeper_players() %>%
players_endpoint <- mfl_players() %>%
dplyr::select("player_id", "player_name", "pos", "team")

franchises_endpoint <- ff_franchises(conn) %>%
Expand Down
5 changes: 1 addition & 4 deletions man/ff_league.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/ff_starters.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.