From 7928083f85ca307cf7c6aec13657209a629ddd6b Mon Sep 17 00:00:00 2001 From: MananMukim Date: Wed, 24 Aug 2022 15:54:50 +0530 Subject: [PATCH 1/6] 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/6] 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 From ef5b32c14dcac1c429d2b23551fd7d21f5b9d56a Mon Sep 17 00:00:00 2001 From: MananMukim Date: Thu, 25 Aug 2022 11:13:15 +0530 Subject: [PATCH 3/6] Added new response methods for person.enrich --- fullcontact/response/person_response.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/fullcontact/response/person_response.py b/fullcontact/response/person_response.py index 0f03830..224a538 100644 --- a/fullcontact/response/person_response.py +++ b/fullcontact/response/person_response.py @@ -64,5 +64,11 @@ def get_census(self) -> dict: def get_identifiers(self) -> dict: return self.get_details().get("identifiers", None) or {} - def get_extended(self) -> dict: - return self.get_summary().get("extended", None) or {} + def get_surveys(self) -> dict: + return self.get_details().get("surveys", None) or {} + + def get_marketTrends(self) -> dict: + return self.get_details().get("marketTrends", None) or {} + + def get_Triggers(self) -> dict: + return self.get_details().get("triggers", None) or {} From 7d029af86a495d4a1f77861e0fcedb67e7df90c1 Mon Sep 17 00:00:00 2001 From: MananMukim Date: Thu, 25 Aug 2022 11:19:01 +0530 Subject: [PATCH 4/6] Removed kbmg responses --- fullcontact/response/person_response.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/fullcontact/response/person_response.py b/fullcontact/response/person_response.py index 224a538..17b39d2 100644 --- a/fullcontact/response/person_response.py +++ b/fullcontact/response/person_response.py @@ -55,12 +55,6 @@ def get_interests(self) -> list: def get_household(self) -> dict: return self.get_details().get("household", None) or {} - def get_finance(self) -> dict: - return self.get_details().get("finance", None) or {} - - def get_census(self) -> dict: - return self.get_details().get("census", None) or {} - def get_identifiers(self) -> dict: return self.get_details().get("identifiers", None) or {} @@ -72,3 +66,6 @@ def get_marketTrends(self) -> dict: def get_Triggers(self) -> dict: return self.get_details().get("triggers", None) or {} + + def get_buyer(self) -> dict: + return self.get_details().get("buyer", None) or {} From 771904e8b22cd2ee8a14bd199fd3035d6871cc02 Mon Sep 17 00:00:00 2001 From: MananMukim Date: Thu, 25 Aug 2022 11:26:35 +0530 Subject: [PATCH 5/6] Updated Readme and Version --- README.md | 9 +++++---- fullcontact/__about__.py | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a80bd97..66e4a28 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.1.0 +python-fullcontact==4.2.0 ``` # Installation @@ -387,10 +387,11 @@ class: _fullcontact.response.person_response.PersonEnrichResponse_ * `get_urls()`: _List[dict]_ - URLs from Person Enrich Response * `get_interests()`: _List[dict]_ - Interests from Person Enrich Response * `get_household()`: _dict_ - Household details from Person Enrich Response -* `get_finance()`: _dict_ - Finance details from Person Enrich Response -* `get_census()`: _dict_ - Census details from Person Enrich Response * `get_identifiers()`: _dict_ - Identifiers from Person Enrich Response -* `get_extended()`: _dict_ - All Extended data +* `get_surveys()`: _dict_ - Surveys details from Person Enrich Response +* `get_marketTrends()`: _dict_ - MarketTrends details from Person Enrich Response +* `get_triggers()`: _dict_ - Triggers details from Person Enrich Response +* `get_buyer()`: _dict_ - Buyer details from Person Enrich Response ### FullContactClient.person.enrich_async() diff --git a/fullcontact/__about__.py b/fullcontact/__about__.py index 86adcf9..552f1c1 100644 --- a/fullcontact/__about__.py +++ b/fullcontact/__about__.py @@ -8,7 +8,7 @@ ] __name__ = "python-fullcontact" -__version__ = "4.1.0" +__version__ = "4.2.0" __author__ = "FullContact" __author_email__ = "pypy@fullcontact.com" __description__ = "Client library for FullContact V3 Enrich and Resolve APIs" From 7bb9556811c83f7f45671ccbbf2fb37bc6ec96ee Mon Sep 17 00:00:00 2001 From: MananMukim Date: Thu, 25 Aug 2022 23:03:19 +0530 Subject: [PATCH 6/6] Removed Details.Buyer --- README.md | 1 - fullcontact/response/person_response.py | 3 --- 2 files changed, 4 deletions(-) diff --git a/README.md b/README.md index 66e4a28..d9186e5 100644 --- a/README.md +++ b/README.md @@ -391,7 +391,6 @@ class: _fullcontact.response.person_response.PersonEnrichResponse_ * `get_surveys()`: _dict_ - Surveys details from Person Enrich Response * `get_marketTrends()`: _dict_ - MarketTrends details from Person Enrich Response * `get_triggers()`: _dict_ - Triggers details from Person Enrich Response -* `get_buyer()`: _dict_ - Buyer details from Person Enrich Response ### FullContactClient.person.enrich_async() diff --git a/fullcontact/response/person_response.py b/fullcontact/response/person_response.py index 17b39d2..b70a52b 100644 --- a/fullcontact/response/person_response.py +++ b/fullcontact/response/person_response.py @@ -66,6 +66,3 @@ def get_marketTrends(self) -> dict: def get_Triggers(self) -> dict: return self.get_details().get("triggers", None) or {} - - def get_buyer(self) -> dict: - return self.get_details().get("buyer", None) or {}