File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 1717function signin (username:: String , api_key:: String , endpoints= None)
1818# Define session credentials/endpoint configuration, where endpoint is a Dict
1919
20+ global plotlycredentials = PlotlyCredentials (username, api_key)
21+
22+ # if endpoints are specified both the base and api domains must be specified
2023 if endpoints != None
21- base_domain = get (endpoints, " plotly_domain" , default_endpoints[" base" ])
22- api_domain = get (endpoints, " plotly_api_domain" , default_endpoints[" api" ])
23- global plotlyconfig = PlotlyConfig (base_domain, api_domain)
24+ try
25+ base_domain = endpoints[" plotly_domain" ]
26+ api_domain = endpoints[" plotly_api_domain" ]
27+ global plotlyconfig = PlotlyConfig (base_domain, api_domain)
28+ catch
29+ error (" You must specify both the base and api endpoints." )
30+ end
2431 end
25- global plotlycredentials = PlotlyCredentials (username, api_key)
2632end
2733
2834function get_credentials ()
You can’t perform that action at this time.
0 commit comments