Skip to content

Commit

Permalink
adjust some messages
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcaseb committed Sep 1, 2023
1 parent 820d242 commit 2402021
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions R/build_nflfastR_pbp.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,18 @@ build_nflfastR_pbp <- function(game_ids,

if (!is.vector(game_ids) && is.data.frame(game_ids)) game_ids <- game_ids$game_id

if (!is.vector(game_ids)) cli::cli_abort("Param {.code game_ids} is not a valid vector!")
if (!is.vector(game_ids)) cli::cli_abort("Param {.arg game_ids} is not a valid vector!")

if (isTRUE(decode) && !is_installed("gsisdecoder")) {
cli::cli_abort("Package {.val gsisdecoder} required for decoding. Please install it with {.code install.packages(\"gsisdecoder\")}.")
cli::cli_abort("Package {.pkg gsisdecoder} required for decoding. Please install it with {.code install.packages(\"gsisdecoder\")}.")
}

if (isTRUE(rules)) rule_header("Build nflfastR Play-by-Play Data")

game_count <- ifelse(is.vector(game_ids), length(game_ids), nrow(game_ids))
builder <- TRUE

if (game_count > 1) {
cli::cli_ul("{my_time()} | Start download of {game_count} games...")
} else {
cli::cli_ul("{my_time()} | Start download of {game_count} game...")
}
cli::cli_ul("{my_time()} | Start download of {game_count} game{?s}...")

ret <- fast_scraper(game_ids = game_ids, ..., in_builder = builder) %>%
clean_pbp(in_builder = builder) %>%
Expand Down

0 comments on commit 2402021

Please sign in to comment.