A package to allow users to interact with the xmlstats api as developed by Erik Berg. Users must get a token from xmlstats to use most of their services.
require(devtools)
install_github("brian-bot/xmlstats")
setToken("myTokenString1234")
This can be set as a hook in your (private) .Rprofile
setHook(
packageEvent("xmlstats", "attach"),
function(...){
setToken("myTokenString1234")
}
)
theseEvents <- getMlbDate(as.Date("2014-03-22"))
To make any call to the API:
mlbTeams <- xmlstatsRestGET('/mlb/teams.json')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.