Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 33c3ad5

Browse files
committed
plotly_api_domain to get_config
1 parent c112841 commit 33c3ad5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

plotly/plotly/plotly.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ def sign_in(username, api_key, **kwargs):
6161

6262
_config['plotly_domain'] = kwargs.get('plotly_domain')
6363
_config['plotly_streaming_domain'] = kwargs.get('plotly_streaming_domain')
64+
_config['plotly_api_domain'] = kwargs.get('plotly_api_domain')
6465
# TODO: verify format of config options
6566

6667

@@ -739,7 +740,7 @@ def upload(cls, grid, filename,
739740

740741
grid.id = grid_id
741742

742-
plotly_domain = tools.get_config_file()['plotly_domain']
743+
plotly_domain = get_config()['plotly_domain']
743744
grid_url = '{}/~{}'.format(plotly_domain, grid_id.replace(':', '/'))
744745

745746
if meta is not None:
@@ -907,7 +908,7 @@ def response_handler(cls, response):
907908

908909
@classmethod
909910
def api_url(cls, resource):
910-
return ('{}/v2/{}'.format(tools.get_config_file()['plotly_api_domain'],
911+
return ('{}/v2/{}'.format(get_config()['plotly_api_domain'],
911912
resource))
912913

913914
@classmethod

0 commit comments

Comments
 (0)