Open tanho63 opened 2 years ago
predraft picks here, same idea
update_predraft_picks <- function(conn,franchise_id,round,picks){
data = list(
`LEAGUE_ID` = conn$league_id,
`FRANCHISE_ID` = franchise_id,
`ROUND` = round,
# `MAX_ROUNDS` = '32',
# `ALL_DRAFT_PICKS` = '27,28,29,30,31,32,',
# `sel_pid` = '',
`PICKS` = picks %>% paste(collapse = ",")
# `continue` = 'Save These Picks And Continue'
)
res <- httr::POST(
url = 'https://www61.myfantasyleague.com/2022/new_predraft',
conn$auth_cookie,
body = data,
encode = 'form')
cli::cli_alert(httr::status_code(res))
return(invisible(res))
}
update_predraft_picks(conn,"0001","29",c('12476','15285','12505','15425','12152'))