From 7928083f85ca307cf7c6aec13657209a629ddd6b Mon Sep 17 00:00:00 2001 From: MananMukim Date: Wed, 24 Aug 2022 15:54:50 +0530 Subject: [PATCH 1/2] Updated Response for Verify Methods --- README.md | 32 ++++++++++++------------- fullcontact/__about__.py | 2 +- fullcontact/response/verify_response.py | 8 +++---- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index d6e787c..eb97521 100644 --- a/README.md +++ b/README.md @@ -1467,7 +1467,7 @@ Being a request level parameter, this can be used to override any header that ha # Synchronous match execution match_response = fullcontact_client.verify.match(email="bart.lorang@fullcontact.com") print(match_response.json()) -# Output: {'email': True} +# Output: {"email" : "self", "risk": 0.2} # Synchronous signals execution signals_response = fullcontact_client.verify.signals(email="marquitaross006@gmail.com") @@ -1487,13 +1487,13 @@ Output: # Synchronous activity execution activity_response = fullcontact_client.verify.activity(email="bart.lorang@fullcontact.com") print(activity_response.json()) -# Output: {'emails': 0.03} +# Output: {"emails" : 0.83, "online" : 0.91, "social" : 0.32, "employment" : 0.78} # Asynchronous match execution match_async_response = fullcontact_client.verify.match_async(email="bart.lorang@fullcontact.com") match_response = match_async_response.result() print(match_response.json()) -# Output: {'email': True} +# Output: {"email" : "self", "risk": 0.2} # Asynchronous signals execution signals_async_response = fullcontact_client.verify.signals_async(email="marquitaross006@gmail.com") @@ -1515,7 +1515,7 @@ Output: activity_async_response = fullcontact_client.verify.activity_async(email="bart.lorang@fullcontact.com") activity_response = activity_async_response.result() print(activity_response.json()) -# Output: {'emails': 0.03} +# Output: {"emails" : 0.83, "online" : 0.91, "social" : 0.32, "employment" : 0.78} ``` @@ -1546,18 +1546,15 @@ class: _fullcontact.response.verify_response.MatchResponse_ * `json()`: _dict_ - Response JSON as dict * `get_message()`: _str_ - Response message or HTTP status message * `get_headers()`: _dict_ - Response headers -* `get_city()`: _bool_ - city flag from Verify Match Response -* `get_region()`: _bool_ - region flag from Verify Match Response -* `get_country()`: _bool_ - country flag from Verify Match Response -* `get_continent()`: _bool_ - continent flag from Verify Match Response -* `get_postalCode()`: _bool_ - postalCode flag from Verify Match Response -* `get_familyName()`: _bool_ - familyName flag from Verify Match Response -* `get_givenName()`: _bool_ - givenName flag from Verify Match Response -* `get_phone()`: _bool_ - phone flag from Verify Match Response -* `get_maid()`: _bool_ - maid flag from Verify Match Response -* `get_email()`: _bool_ - email flag from Verify Match Response -* `get_social()`: _bool_ - social flag from Verify Match Response -* `get_nonId()`: _bool_ - nonId flag from Verify Match Response +* `get_city()`: _str_ - city flag from Verify Match Response +* `get_region()`: _str_ - region flag from Verify Match Response +* `get_country()`: _str_ - country flag from Verify Match Response +* `get_postalCode()`: _str_ - postalCode flag from Verify Match Response +* `get_familyName()`: _str_ - familyName flag from Verify Match Response +* `get_givenName()`: _str_ - givenName flag from Verify Match Response +* `get_phone()`: _str_ - phone flag from Verify Match Response +* `get_email()`: _str_ - email flag from Verify Match Response +* `get_risk()`: _float_ - email flag from Verify Match Response ### FullContactClient.verify.match_async() @@ -1670,6 +1667,9 @@ class: _fullcontact.response.verify_response.VerifyActivityResponse_ * `get_message()`: _str_ - Response message or HTTP status message * `get_headers()`: _dict_ - Response headers * `get_emails()`: _float_ - email activity score from Verify Activity Response +* `get_online()`: _float_ - online activity score from Verify Activity Response +* `get_social()`: _float_ - social activity score from Verify Activity Response +* `get_employment()`: _float_ - employment activity score from Verify Activity Response ### FullContactClient.verify.activity_async() diff --git a/fullcontact/__about__.py b/fullcontact/__about__.py index 9e54c56..86adcf9 100644 --- a/fullcontact/__about__.py +++ b/fullcontact/__about__.py @@ -8,7 +8,7 @@ ] __name__ = "python-fullcontact" -__version__ = "4.0.0" +__version__ = "4.1.0" __author__ = "FullContact" __author_email__ = "pypy@fullcontact.com" __description__ = "Client library for FullContact V3 Enrich and Resolve APIs" diff --git a/fullcontact/response/verify_response.py b/fullcontact/response/verify_response.py index 123367d..792e320 100644 --- a/fullcontact/response/verify_response.py +++ b/fullcontact/response/verify_response.py @@ -11,21 +11,21 @@ class VerifyActivityResponse(BaseApiResponse): def get_emails(self): return self.json().get("emails", None) or None + def get_online(self): return self.json().get("online", None) or None + def get_social(self): return self.json().get("social", None) or None + def get_employment(self): return self.json().get("employment", None) or None class VerifyMatchResponse(BaseApiResponse): def get_city(self): return self.json().get("city", None) or None def get_region(self): return self.json().get("region", None) or None def get_country(self): return self.json().get("country", None) or None - def get_continent(self): return self.json().get("continent", None) or None def get_postalCode(self): return self.json().get("postalCode", None) or None def get_familyName(self): return self.json().get("familyName", None) or None def get_givenName(self): return self.json().get("familyName", None) or None def get_phone(self): return self.json().get("phone", None) or None - def get_maid(self): return self.json().get("maid", None) or None def get_email(self): return self.json().get("email", None) or None - def get_social(self): return self.json().get("social", None) or None - def get_nonId(self): return self.json().get("nonId", None) or None + def get_risk(self): return self.json().get("risk", None) or None class VerifySignalResponse(BaseApiResponse): From b8ea77c202be0340dae69969a69ff5bf55ac686f Mon Sep 17 00:00:00 2001 From: MananMukim Date: Wed, 24 Aug 2022 16:25:52 +0530 Subject: [PATCH 2/2] Updated Readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index eb97521..a80bd97 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ To add FullContact Python Client library to your project, add the below line to requirement in the `setup.py` file. ``` -python-fullcontact==4.0.0 +python-fullcontact==4.1.0 ``` # Installation