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