import apideck_unify
from apideck_unify import Apideck
import os
with Apideck(
api_key=os.getenv("APIDECK_API_KEY", ""),
consumer_id="<insert-consumer-id-here>",
app_id="<insert-application-id-here>",
) as apideck:
res = apideck.crm.contacts.list(service_id="salesforce", filter_={
"first_name": "Elon",
"last_name": "Musk",
"email": "elon@tesla.com",
"company_id": "12345",
"owner_id": "12345",
}, sort={
"by": apideck_unify.ContactsSortBy.CREATED_AT,
"direction": apideck_unify.SortDirection.DESC,
}, pass_through={
"search": "San Francisco",
}, fields="id,updated_at")
while res is not None:
# Handle items
res = res.next()