Skip to content

Commit 7f39012

Browse files
committed
updated apikey in splitio.client classes
1 parent feae21a commit 7f39012

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

splitio/client/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ def track(self, key, traffic_type, event_type, value=None, properties=None):
377377
start = get_current_epoch_time_ms()
378378
key = input_validator.validate_track_key(key)
379379
event_type = input_validator.validate_event_type(event_type)
380-
should_validate_existance = self.ready and self._factory._apikey != 'localhost' # pylint: disable=protected-access
380+
should_validate_existance = self.ready and self._factory._sdkkey != 'localhost' # pylint: disable=protected-access
381381
traffic_type = input_validator.validate_traffic_type(
382382
traffic_type,
383383
should_validate_existance,

splitio/client/config.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
}
6363

6464

65-
def _parse_operation_mode(apikey, config):
65+
def _parse_operation_mode(sdkkey, config):
6666
"""
6767
Process incoming config to determine operation mode and storage type
6868
@@ -72,7 +72,7 @@ def _parse_operation_mode(apikey, config):
7272
:returns: operation mode and storage type
7373
:rtype: Tuple (str, str)
7474
"""
75-
if apikey == 'localhost':
75+
if sdkkey == 'localhost':
7676
_LOGGER.debug('Using Localhost operation mode')
7777
return 'localhost', 'localhost'
7878

@@ -119,20 +119,20 @@ def _sanitize_impressions_mode(storage_type, mode, refresh_rate=None):
119119
return mode, refresh_rate
120120

121121

122-
def sanitize(apikey, config):
122+
def sanitize(sdkkey, config):
123123
"""
124124
Look for inconsistencies or ill-formed configs and tune it accordingly.
125125
126-
:param apikey: customer's apikey
127-
:type apikey: str
126+
:param sdkkey: sdk key
127+
:type sdkkey: str
128128
129129
:param config: DEFAULT + user supplied config
130130
:type config: dict
131131
132132
:returns: sanitized config
133133
:rtype: dict
134134
"""
135-
config['operationMode'], config['storageType'] = _parse_operation_mode(apikey, config)
135+
config['operationMode'], config['storageType'] = _parse_operation_mode(sdkkey, config)
136136
processed = DEFAULT_CONFIG.copy()
137137
processed.update(config)
138138
imp_mode, imp_rate = _sanitize_impressions_mode(config['storageType'], config.get('impressionsMode'),

splitio/client/factory.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class SplitFactory(object): # pylint: disable=too-many-instance-attributes
9191

9292
def __init__( # pylint: disable=too-many-arguments
9393
self,
94-
apikey,
94+
sdkkey,
9595
storages,
9696
labels_enabled,
9797
recorder,
@@ -120,7 +120,7 @@ def __init__( # pylint: disable=too-many-arguments
120120
:param preforked_initialization: Whether should be instantiated as preforked or not.
121121
:type preforked_initialization: bool
122122
"""
123-
self._apikey = apikey
123+
self._sdkkey = sdkkey
124124
self._storages = storages
125125
self._labels_enabled = labels_enabled
126126
self._sync_manager = sync_manager
@@ -253,7 +253,7 @@ def _wait_for_tasks_to_stop():
253253
finally:
254254
self._status = Status.DESTROYED
255255
with _INSTANTIATED_FACTORIES_LOCK:
256-
_INSTANTIATED_FACTORIES.subtract([self._apikey])
256+
_INSTANTIATED_FACTORIES.subtract([self._sdkkey])
257257

258258
@property
259259
def destroyed(self):

splitio/client/input_validator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,8 @@ def validate_factory_instantiation(sdkkey):
453453
"""
454454
Check if the factory if being instantiated with the appropriate arguments.
455455
456-
:param apikey: str
457-
:type apikey: str
456+
:param sdkkey: str
457+
:type sdkkey: str
458458
:return: bool
459459
:rtype: True|False
460460
"""

0 commit comments

Comments
 (0)