File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
- 4.0.5
1
+ 4.0.6
Original file line number Diff line number Diff line change @@ -6,8 +6,13 @@ def __init__(self, config):
6
6
self .config = config
7
7
8
8
def _configure_api_client (self , api_client_package , api_name ):
9
+ api_factory = self .config .get ("api_factory" ) or self ._default_api_factory
10
+ config = {k : v for k , v in self .config .items () if k != "api_factory" and v }
11
+ return api_factory (api_client_package , api_name , config )
12
+
13
+ @staticmethod
14
+ def _default_api_factory (api_client_package , api_name , config ):
9
15
configuration = api_client_package .Configuration ()
10
- config = {k : v for k , v in self .config .items () if v is not None }
11
16
if "api_key" in config :
12
17
configuration .api_key ["hapikey" ] = config ["api_key" ]
13
18
if "access_token" in config :
You can’t perform that action at this time.
0 commit comments