fastRhockey
fastRhockey copied to clipboard
Question about the URL request
Curious why this line is needed in the code - or more broadly, why there's a Callback at the end of the base_url? It seems to work without the callback, but maybe there's some information I am missing.
I'm also curious about the key and if we should be concerned about it ever rotating. Thanks!
https://github.com/sportsdataverse/fastRhockey/blob/12ff24b40a665c6b47bcfb757e207ecec22d3eff/R/pwhl_teams.R#L28
Yeah, as I'm going back and updating / re-writing some of the functions, I am converting them to this to handle the regex better:
callback_pattern <- "angular.callbacks._\\d+\\("
res <- gsub(callback_pattern, "", res)