Ver código fonte

errant endpoints in various render_ functions

master
boB Rudis 6 anos atrás
pai
commit
778a577c3f
Nenhuma chave conhecida encontrada para esta assinatura no banco de dados ID da chave GPG: 1D7529BE14E2BBA9
  1. 2
      R/render-har.r
  2. 2
      R/render-jpg.r
  3. 9
      R/render-json.r
  4. 2
      R/render-png.r
  5. 2
      README.Rmd

2
R/render-har.r

@ -40,7 +40,7 @@ render_har <- function(splash_obj = splash_local, url, base_url, response_body=F
res <- httr::GET(splash_url(splash_obj), path="render.har", encode="json", query=params)
} else {
res <- httr::GET(
splash_url(splash_obj), path="render.html", encode="json", query=params,
splash_url(splash_obj), path="render.har", encode="json", query=params,
httr::authenticate(splash_obj$user, splash_obj$pass)
)
}

2
R/render-jpg.r

@ -46,7 +46,7 @@ render_jpeg <- render_jpg <- function(
res <- httr::GET(splash_url(splash_obj), path="render.jpeg", encode="json", query=params)
} else {
res <- httr::GET(
splash_url(splash_obj), path="render.html", encode="json", query=params,
splash_url(splash_obj), path="render.jpeg", encode="json", query=params,
httr::authenticate(splash_obj$user, splash_obj$pass)
)
}

9
R/render-json.r

@ -64,7 +64,14 @@ render_json <- function(splash_obj = splash_local, url, base_url=NULL, quality=7
if (!missing(save_args)) params$save_args <- jsonlite::unbox(save_args)
if (!missing(load_args)) params$load_args <- jsonlite::unbox(load_args)
res <- httr::GET(splash_url(splash_obj), path="render.json", encode="json", query=params)
if (is.null(splash_obj$user)) {
res <- httr::GET(splash_url(splash_obj), path="render.json", encode="json", query=params)
} else {
res <- httr::GET(
splash_url(splash_obj), path="render.json", encode="json", query=params,
httr::authenticate(splash_obj$user, splash_obj$pass)
)
}
httr::stop_for_status(res)

2
R/render-png.r

@ -51,7 +51,7 @@ render_png <- function(
res <- httr::GET(splash_url(splash_obj), path="render.png", encode="json", query=params)
} else {
res <- httr::GET(
splash_url(splash_obj), path="render.html", encode="json", query=params,
splash_url(splash_obj), path="render.png", encode="json", query=params,
httr::authenticate(splash_obj$user, splash_obj$pass)
)
}

2
README.Rmd

@ -119,6 +119,8 @@ Suggest more in a feature req!
### Installation
```{r eval=FALSE}
devtools::install_git("https://gitlab.com/hrbrmstr/splashr.git")
# or
devtools::install_github("hrbrmstr/splashr")
```

Carregando…
Cancelar
Salvar