We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ff3a0f7 + 8c53084 commit 5ab761dCopy full SHA for 5ab761d
VERSION
@@ -1 +1 @@
1
-4.0.5
+4.0.6
hubspot/discovery/discovery_base.py
@@ -6,8 +6,13 @@ def __init__(self, config):
6
self.config = config
7
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):
15
configuration = api_client_package.Configuration()
- config = {k: v for k, v in self.config.items() if v is not None}
16
if "api_key" in config:
17
configuration.api_key["hapikey"] = config["api_key"]
18
if "access_token" in config:
0 commit comments