Skip to content

Commit

Permalink
new api integrated
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Kisler committed Jun 10, 2018
1 parent c31a40b commit 3273c7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functions/datUtils.R
Expand Up @@ -7,9 +7,9 @@
datFetcher <- function() {
library(jsonlite, verbose = F, quietly = T)

dat <- tryCatch(fromJSON( gsub("\\@ts\\@", paste0(as.integer(Sys.time()), '000'), "https://shipahoy.io/api/v1/replay?start_ts=@ts@&end_ts=@ts@") )$vessels ,
dat <- tryCatch(fromJSON( gsub("\\@ts\\@", paste0(as.integer(Sys.time()), '000'), "https://shipahoy.io/api/v1/live?start_ts=@ts@&port_id=2&end_ts=@ts@") )$vessels ,
error = function(c) return(data.frame())
)
) %>% data.frame()
return(dat)
}

Expand Down

0 comments on commit 3273c7e

Please sign in to comment.