| getEvents | R Documentation |
Return a dataframe that contains all events and kpi values for a set of given match IDs
getEvents(
matches,
token,
include_kpis = TRUE,
include_set_pieces = FALSE,
host = "https://api.impect.com"
)
matches |
'IMPECT' match ID or a list of match IDs |
token |
bearer token |
include_kpis |
include KPIs in event data |
include_set_pieces |
include additional set piece data in event data |
host |
host environment |
a dataframe containing all events and kpi values for a set of given match IDs
# Toy example: this will error quickly (no API token)
try(events <- getEvents(
matches = c(0, 1),
token = "invalid",
include_kpis = T,
include_set_pieces = F
))
# Real usage: requires valid Bearer Token from `getAccessToken()`
## Not run:
events <- getEvents(
matches = c(84248, 158150),
token = "yourToken",
include_kpis = T,
include_set_pieces = F
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.