Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
saiemgilani committed Jun 6, 2023
1 parent b79f942 commit f9c5617
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 12 deletions.
8 changes: 4 additions & 4 deletions R/kp_team_tables.R
Expand Up @@ -517,9 +517,9 @@ kp_gameplan <- function(team, year=2021){
expr = {
if (!has_kp_user_and_pw()) stop("This function requires a KenPom subscription e-mail and password combination,\n set as the system environment variables KP_USER and KP_PW.", "\n See ?kp_user_pw for details.", call. = FALSE)
browser <- login()
if (!(is.numeric(min_year) && nchar(min_year) == 4 && min_year >= 2001)) {
if (!(is.numeric(year) && nchar(year) == 4 && year >= 2001)) {
# Check if year is numeric, if not NULL
cli::cli_abort("Enter valid min_ as a number (YYYY), data only goes back to 2001")
cli::cli_abort("Enter valid year as a number (YYYY), data only goes back to 2001")
}

if (!(team %in% hoopR::teams_links$Team)) {
Expand Down Expand Up @@ -786,9 +786,9 @@ kp_opptracker <- function(team, year = 2021){
expr = {
if (!has_kp_user_and_pw()) stop("This function requires a KenPom subscription e-mail and password combination,\n set as the system environment variables KP_USER and KP_PW.", "\n See ?kp_user_pw for details.", call. = FALSE)
browser <- login()
if (!(is.numeric(min_year) && nchar(min_year) == 4 && min_year >= 2001)) {
if (!(is.numeric(year) && nchar(year) == 4 && year >= 2001)) {
# Check if year is numeric, if not NULL
cli::cli_abort("Enter valid min_ as a number (YYYY), data only goes back to 2001")
cli::cli_abort("Enter valid year as a number (YYYY), data only goes back to 2001")
}

if (!(team %in% hoopR::teams_links$Team)) {
Expand Down
4 changes: 2 additions & 2 deletions R/ncaa_mbb_data.R
Expand Up @@ -84,7 +84,7 @@ ncaa_mbb_teams <- function(year = most_recent_mbb_season(), division = 1, ...) {
"&division=", division,
"&sport_code=MBB")

resp <- httr::RETRY("GET", url = {{url}}, ..., headers, httr::timeout(15))
resp <- httr::RETRY("GET", url = {{url}}, headers, httr::timeout(15))

data_read <- resp %>%
httr::content(as = "text", encoding = "UTF-8") %>%
Expand Down Expand Up @@ -122,7 +122,7 @@ ncaa_mbb_teams <- function(year = most_recent_mbb_season(), division = 1, ...) {
"&division=", division,
"&sport_code=MBB")

resp <- httr::RETRY("GET", url = {{conf_team_urls}}, ..., headers, httr::timeout(15))
resp <- httr::RETRY("GET", url = {{conf_team_urls}}, headers, httr::timeout(15))

team_urls <- resp %>%
httr::content(as = "text", encoding = "UTF-8") %>%
Expand Down
2 changes: 1 addition & 1 deletion man/espn_nba_scoreboard.Rd

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

2 changes: 1 addition & 1 deletion man/kp_fanmatch.Rd

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

2 changes: 1 addition & 1 deletion man/load_mbb_pbp.Rd

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

2 changes: 1 addition & 1 deletion man/load_mbb_player_box.Rd

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

4 changes: 3 additions & 1 deletion man/load_mbb_schedule.Rd

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

2 changes: 1 addition & 1 deletion man/load_mbb_team_box.Rd

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

0 comments on commit f9c5617

Please sign in to comment.