diff --git a/DESCRIPTION b/DESCRIPTION index b76987291a..79146a2a41 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: plotly Title: Create Interactive Web Graphics via 'plotly.js' -Version: 4.11.0 +Version: 4.12.0 Authors@R: c(person("Carson", "Sievert", role = c("aut", "cre"), email = "cpsievert1@gmail.com", comment = c(ORCID = "0000-0002-4958-2844")), person("Chris", "Parmer", role = "aut", diff --git a/NEWS.md b/NEWS.md index 71d932d6b1..0145ea0ee5 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# plotly (development version) +# plotly 4.12.0 ## Changes to plotly.js @@ -405,7 +405,7 @@ This is minor patch release with a few minor bug fixes and updates test expectat * Added the `highlight()` function for configuring selection modes/sequences/options. * Added support for animation. For some relatively basic examples, see the examples section of `help(animation)`. For a more thorough overview, see * Added a `frame` argument to `plot_ly()` for creating animations. Also added the `animation_opts()`, `animation_slider()`, and `animation_button()` functions for configuring animation defaults. -* Added a new interface to [v2 of the REST API](https://api.plot.ly/v2). This new interface makes the `plotly_POST()` and `get_figure()` functions obsolete (use `api_create()` and `api_download_plot()` instead), and thus, are now deprecated, but remain around for backwards-compatibility. For more details, see `help(api)`. +* Added a new interface to v2 of the REST API. This new interface makes the `plotly_POST()` and `get_figure()` functions obsolete (use `api_create()` and `api_download_plot()` instead), and thus, are now deprecated, but remain around for backwards-compatibility. For more details, see `help(api)`. * Added support for conversion of more **ggplot2** geoms via `ggplotly()`: `GeomCol`, `GeomRug`, `GeomCrossbar`, `GeomQuantile`, `GeomSpoke`, `GeomDotplot`, `GeomRasterAnn` (i.e., `annotation_raster()`), and `GeomAnnotationMap` (i.e., `annotation_map()`). * Added a new function `raster2uri()` which makes it easier to embed raster objects as [images](https://plotly.com/r/reference/#layout-images) via data URIs. For examples, see `help(raster2uri)`. * `ggplotly()` gains a new argument, `dynamicTicks`, which allows axis ticks to update upon zoom/pan interactions (fixes #485). @@ -1182,7 +1182,7 @@ Fixed filename, fileopt arguments in plot_ly. Specifying the same filename will 1.0.8 -- 14 Sep 2015 -Added the plotly_IMAGES() function which interfaces to the images endpoint https://api.plot.ly/v2/#images +Added the plotly_IMAGES() function which interfaces to the images endpoint. Details -> https://github.com/ropensci/plotly/pull/279 diff --git a/R/api_exports.R b/R/api_exports.R index 19445ffe40..db2af73f89 100644 --- a/R/api_exports.R +++ b/R/api_exports.R @@ -44,7 +44,6 @@ #' @export #' @rdname api #' @author Carson Sievert -#' @references \url{https://api.plot.ly/v2} #' @seealso [signup()] #' @examplesIf interactive() || !identical(.Platform$OS.type, "windows") #' @@ -80,30 +79,29 @@ #' api() #' #' # search the entire platform! -#' # see https://api.plot.ly/v2/search #' api("search?q=overdose") #' api("search?q=plottype:pie trump fake") #' #' # these examples will require a user account #' usr <- Sys.getenv("plotly_username", NA) #' if (!is.na(usr)) { -#' # your account info https://api.plot.ly/v2/#users +#' # your account info #' api(sprintf("users/%s", usr)) -#' # your folders/files https://api.plot.ly/v2/folders#user +#' # your folders/files #' api(sprintf("folders/home?user=%s", usr)) #' } #' -#' # Retrieve a specific file https://api.plot.ly/v2/files#retrieve +#' # Retrieve a specific file #' api("files/cpsievert:14681") -#' -#' # change the filename https://api.plot.ly/v2/files#update +#' +#' # change the filename #' # (note: this won't work unless you have proper credentials to the relevant account) -#' api("files/cpsievert:14681", "PATCH", list(filename = "toy file")) -#' -#' # Copy a file https://api.plot.ly/v2/files#lookup +#' api("files/cpsievert:14681", "PATCH", list(filename = "toy file")) +#' +#' # Copy a file #' api("files/cpsievert:14681/copy", "POST") -#' -#' # Create a folder https://api.plot.ly/v2/folders#create +#' +#' # Create a folder #' api("folders", "POST", list(path = "/starts/at/root/and/ends/here")) #' #' } diff --git a/man/api.Rd b/man/api.Rd index a6ba657ab6..16f002afcf 100644 --- a/man/api.Rd +++ b/man/api.Rd @@ -126,38 +126,34 @@ layout( api() # search the entire platform! -# see https://api.plot.ly/v2/search api("search?q=overdose") api("search?q=plottype:pie trump fake") # these examples will require a user account usr <- Sys.getenv("plotly_username", NA) if (!is.na(usr)) { - # your account info https://api.plot.ly/v2/#users + # your account info api(sprintf("users/\%s", usr)) - # your folders/files https://api.plot.ly/v2/folders#user + # your folders/files api(sprintf("folders/home?user=\%s", usr)) } -# Retrieve a specific file https://api.plot.ly/v2/files#retrieve +# Retrieve a specific file api("files/cpsievert:14681") -# change the filename https://api.plot.ly/v2/files#update +# change the filename # (note: this won't work unless you have proper credentials to the relevant account) -api("files/cpsievert:14681", "PATCH", list(filename = "toy file")) +api("files/cpsievert:14681", "PATCH", list(filename = "toy file")) -# Copy a file https://api.plot.ly/v2/files#lookup +# Copy a file api("files/cpsievert:14681/copy", "POST") -# Create a folder https://api.plot.ly/v2/folders#create +# Create a folder api("folders", "POST", list(path = "/starts/at/root/and/ends/here")) } \dontshow{\}) # examplesIf} } -\references{ -\url{https://api.plot.ly/v2} -} \seealso{ \code{\link[=signup]{signup()}} } diff --git a/man/layout.Rd b/man/layout.Rd index 9d94091648..a975f481fe 100644 --- a/man/layout.Rd +++ b/man/layout.Rd @@ -10,7 +10,7 @@ layout(p, ..., data = NULL) \item{p}{A plotly object.} \item{...}{Arguments to the layout object. For documentation, -see \url{https://plotly.com/r/reference/#Layout_and_layout_style_objects}} +see \url{https://plotly.com/r/reference/layout/}} \item{data}{A data frame to associate with this layout (optional). If not provided, arguments are evaluated using the data frame in \code{\link[=plot_ly]{plot_ly()}}.}