Skip to content

Commit 85d2892

Browse files
committed
Add functionality to passin timestamp
1 parent 8481edd commit 85d2892

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

uid2_client/identity_map_client.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,15 @@ def __init__(self, base_url, api_key, client_secret):
3434
self._api_key = api_key
3535
self._client_secret = base64.b64decode(client_secret)
3636

37-
def generate_identity_map(self, identity_map_input):
38-
req, nonce = make_v2_request(self._client_secret, dt.datetime.now(tz=timezone.utc),
37+
def generate_identity_map(self, identity_map_input, timestamp):
38+
req, nonce = make_v2_request(self._client_secret, timestamp,
3939
identity_map_input.get_identity_map_input_as_json_string().encode())
4040
resp = post(self._base_url, '/v2/identity/map', headers=auth_headers(self._api_key), data=req)
4141
resp_body = parse_v2_response(self._client_secret, resp.read(), nonce)
4242
return IdentityMapResponse(resp_body, identity_map_input)
43+
44+
def generate_identity_map(self, identity_map_input):
45+
return self.generate_identity_map(identity_map_input, dt.datetime.now(tz=timezone.utc))
4346

4447
def get_identity_buckets(self, since_timestamp):
4548
req, nonce = make_v2_request(self._client_secret, dt.datetime.now(tz=timezone.utc),

0 commit comments

Comments
 (0)