19
19
# ' Plotly to view this graph. You can privately share this graph with other
20
20
# ' Plotly users in your online Plotly account and they will need to be logged
21
21
# ' in to view this plot.
22
- # ' If 'secret ', anyone with this secret link can view this chart. It will
22
+ # ' If 'hidden ', anyone with this hidden link can view this chart. It will
23
23
# ' not appear in the Plotly feed, your profile, or search engines.
24
24
# ' If it is embedded inside a webpage or an IPython notebook, anybody who is
25
25
# ' viewing that page will be able to view the graph.
36
36
# ' }
37
37
38
38
plotly_POST <- function (x , filename , fileopt = " new" ,
39
- sharing = c(" public" , " private" , " secret " )) {
39
+ sharing = c(" public" , " private" , " hidden " )) {
40
40
x <- plotly_build(x )
41
41
x $ filename <- if (! missing(filename )) {
42
42
filename
@@ -52,8 +52,10 @@ plotly_POST <- function(x, filename, fileopt = "new",
52
52
}
53
53
x $ fileopt <- fileopt
54
54
if (! is.null(x $ world_readable )) {
55
- warning(" world_readable was specified in the wrong place." ,
56
- " Please use the sharing argument in plotly_POST()" )
55
+ warning(' world_readable is no longer supported. Instead, set the sharing\n ' ,
56
+ ' argument to "private" (you must be logged in to access),\n ' ,
57
+ ' "hidden" (anybody with the obscured URL can access) or "public"\n ' ,
58
+ ' (anybody can view).' )
57
59
}
58
60
x $ world_readable <- if (sharing [1 ] == " public" ) TRUE else FALSE
59
61
@@ -72,7 +74,7 @@ plotly_POST <- function(x, filename, fileopt = "new",
72
74
base_url <- file.path(get_domain(), " clientresp" )
73
75
resp <- httr :: POST(base_url , body = bod )
74
76
con <- process(struct(resp , " clientresp" ))
75
- if (sharing [1 ] == " secret " ) {
77
+ if (sharing [1 ] == " hidden " ) {
76
78
bits <- strsplit(con $ url , " /" )[[1 ]]
77
79
plot_id <- bits [length(bits )]
78
80
url <- paste0(get_domain(" v2" ), " files/" , verify(" username" ), " :" , plot_id )
0 commit comments