# Toy example: this will error quickly (no API token)
try(player_scores <- getPlayerIterationScores(
iteration = 0,
positions = c("INVALID_POSITION_1", "INVALID_POSITION_2"),
token = "invalid"
))
# Real usage: requires valid Bearer Token from `getAccessToken()`
if (FALSE) {
player_scores <- getPlayerIterationScores(
iteration = 1004,
positions = c("CENTRAL_DEFENDER", "DEFENSE_MIDFIELD"),
token = "yourToken"
)
}
Run the code above in your browser using DataLab