99# ' @param format The desired image format 'png', 'jpeg', 'svg', 'pdf', 'eps', or 'webp'
1010# ' @param scale Both png and jpeg formats will be scaled beyond the specified width and height by this number.
1111# ' @param out_file A filename for writing the image to a file.
12- # ' @param ... arguments passed onto `httr::RETRY`
13- # ' @importFrom httr RETRY write_disk
12+ # ' @param ... arguments passed onto `httr::RETRY`
1413# ' @export
1514# ' @examples \dontrun{
1615# ' p <- plot_ly(x = 1:10)
@@ -36,16 +35,16 @@ plotly_IMAGE <- function(x, width = 1000, height = 500, format = "png",
3635 )
3736 base_url <- file.path(get_domain(" api" ), " v2" , " images" )
3837 resp <- httr :: RETRY(
39- verb = " POST"
40- , url = base_url
41- , body = to_JSON(bod )
42- , times = 5
43- , terminate_on = c(400 , 401 , 403 , 404 )
44- , terminate_on_success = TRUE
45- , api_headers()
46- , api_auth()
47- , if (! missing(out_file )) httr :: write_disk(out_file , overwrite = TRUE )
48- , ...
38+ verb = " POST" ,
39+ url = base_url ,
40+ body = to_JSON(bod ),
41+ times = 5 ,
42+ terminate_on = c(400 , 401 , 403 , 404 ),
43+ terminate_on_success = TRUE ,
44+ api_headers(),
45+ api_auth(),
46+ if (! missing(out_file )) httr :: write_disk(out_file , overwrite = TRUE ),
47+ ...
4948 )
5049 con <- process(append_class(resp , " api_image" ))
5150 invisible (con )
0 commit comments