From 5ae5b34774ae5a0810bf3ad50d31f4865bb1f5c6 Mon Sep 17 00:00:00 2001 From: Giacomo Leidi Date: Mon, 29 Apr 2024 22:30:40 +0200 Subject: [PATCH] api: get_person: Action Network's search_by value now must be email_address for emails. Fixes https://github.com/PhillyDSA/pyactionnetwork/issues/16 --- pyactionnetwork/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyactionnetwork/api.py b/pyactionnetwork/api.py index 2f4c370..f0f9672 100644 --- a/pyactionnetwork/api.py +++ b/pyactionnetwork/api.py @@ -48,12 +48,12 @@ def get_resource(self, resource): url = self.resource_to_url(resource) return requests.get(url, headers=self.headers).json() - def get_person(self, person_id=None, search_by='email', search_string=None): + def get_person(self, person_id=None, search_by='email_address', search_string=None): """Search for a user. Args: search_by (str): - Field by which to search for a user. 'email' is the default. + Field by which to search for a user. 'email_address' is the default. search_string (str): String to search for within the field given by `search_by`