Skip to content

Commit ba45cba

Browse files
committed
Add access to response_json
1 parent 5a0a16e commit ba45cba

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

uid2_client/identity_map_response.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ class IdentityMapResponse:
55
def __init__(self, response, identity_map_input):
66
self._mapped_identities = {}
77
self._unmapped_identities = {}
8-
response_json = json.loads(response)
9-
self._status = response_json["status"]
8+
self.response_json = json.loads(response)
9+
self._status = self.response_json["status"]
1010

1111
if not self.is_success():
1212
raise ValueError("Got unexpected identity map status: " + self._status)
1313

14-
body = response_json["body"]
14+
body = self.response_json["body"]
1515

1616
for identity in body.get("mapped", []):
1717
raw_diis = self._get_raw_diis(identity, identity_map_input)
@@ -44,6 +44,9 @@ def unmapped_identities(self):
4444
@property
4545
def status(self):
4646
return self._status
47+
48+
def response_json(self):
49+
return self.response_json
4750

4851

4952
class MappedIdentity:

0 commit comments

Comments
 (0)