18
18
# ' @import RJSONIO
19
19
# ' @param username plotly username
20
20
# ' @param key plotly API key
21
- # ' @param base.url plotly server
21
+ # ' @param base_url plotly server
22
22
# '
23
23
# ' @return An object of class PlotlyClass, except for the final object after
24
24
# ' adding layers becomes a list class.
57
57
# ' }
58
58
59
59
60
- plotly <- function (username = NULL , key = NULL , base.url = NULL ) {
60
+ plotly <- function (username = NULL , key = NULL , base_url = NULL ) {
61
61
62
62
if (is.null(username )) {
63
63
username <- get_credentials_file(c(" username" , " api_key" ))$ username
@@ -73,11 +73,11 @@ To get started, save your plotly username and API key by calling:\n
73
73
For more help, see https://plot.ly/R or contact <[email protected] >." )
74
74
}
75
75
# Plotly server
76
- if (is.null(base.url )) {
77
- base.url <- get_config_file(" plotly_domain" )$ plotly_domain
76
+ if (is.null(base_url )) {
77
+ base_url <- get_config_file(" plotly_domain" )$ plotly_domain
78
78
}
79
- if (is.null(base.url ) || base.url == " " ) {
80
- base.url <- " https://plot.ly"
79
+ if (is.null(base_url ) || base_url == " " ) {
80
+ base_url <- " https://plot.ly"
81
81
}
82
82
83
83
# public attributes/methods that the user has access to
@@ -90,7 +90,7 @@ For more help, see https://plot.ly/R or contact <
[email protected] >.")
90
90
kwargs $ filename <- pub $ filename
91
91
if (is.null(kwargs $ fileopt ))
92
92
kwargs $ fileopt <- NULL
93
- url <- paste(base.url , " /clientresp" , sep = " " )
93
+ url <- paste(base_url , " /clientresp" , sep = " " )
94
94
95
95
respst <- postForm(url , platform = " R" , version = pub $ version ,
96
96
args = toJSON(args , digits = 50 , collapse = " " ), un = pub $ username ,
@@ -167,7 +167,7 @@ For more help, see https://plot.ly/R or contact <
[email protected] >.")
167
167
" plotly-platform" = " R" )
168
168
response_handler <- basicTextGatherer()
169
169
header_handler <- basicTextGatherer()
170
- curlPerform(url = paste(base.url , " apigetfile" , file_owner , file_id ,
170
+ curlPerform(url = paste(base_url , " apigetfile" , file_owner , file_id ,
171
171
sep = " /" ),
172
172
httpheader = headers ,
173
173
writefunction = response_handler $ update ,
0 commit comments