Closed tcash21 closed 8 years ago
Was the latest PR from master
? I hit an error on the code below, but got around it after installing from current.
options(stringsAsFactors = FALSE)
## remove old package from previous branch
remove.packages("stattleshipR")
## install Tanya's PR
devtools::install_github("stattleship/stattleship-r", ref="tanya-testthat")
## load libraries
library(stattleshipR)
library(dplyr)
## set token
set_token(Sys.getenv("STATTLE_TOKEN"))
## test the sport will but put into proper case
## this should run
sport <- "HOCKEY"
sport <- ss_get_result(sport=sport)
Below I am going to remove that version, and install master
and run the same check.
## is this off of the master branch?
remove.packages("stattleshipR")
## install the master branch
devtools::install_github("stattleship/stattleship-r")
## re-run the test
set_token(Sys.getenv("STATTLE_TOKEN"))
sport <- "HOCKEY"
sport <- ss_get_result(sport=sport)
## verify
sport[[1]]$teams
This is a fix for total stats queries such as this:
Accomplished this by checking for existence of the
link
attribute in the header response. Walking the results is skipped iflink
does not exist.