API details.
hapikey = os.environ.get('HUBSPOT_API_KEY','demo')
#hapikey = 'demo'
# example
results = hubspot_search('andrewm4894@gmail.com', hapikey=hapikey)
results
# example with extra properties
results = hubspot_search('andrewm4894@gmail.com', hapikey=hapikey, properties=["firstname","city"])
results
# tests
results = hubspot_search('andrewm4894@gmail.com', hapikey=hapikey)
results_email = results['results'][0]['properties']['email']
assert results_email == 'andrewm4894@gmail.com'
results = hubspot_search('andrewm4894@gmail.com', hapikey=hapikey, properties=["city"])
results_city = results['results'][0]['properties']['city']
assert results_city == 'Dublin'