diff --git a/examples/smoke-test.py b/examples/smoke-test.py index e81bb678..226e529b 100644 --- a/examples/smoke-test.py +++ b/examples/smoke-test.py @@ -8,11 +8,14 @@ def main(): client = load_env_vars_and_authenticate() # List and fetch sources - sources = client.source.list_sources().data + sources = client.ontology.get_sources().data print(f"Found {len(sources)} sources") - first_source = client.source.get_source(sources[0].id) + # Get first two sources by ID (using multiple IDs works correctly) + filtered_sources = client.ontology.get_sources(id=[sources[0].id, sources[1].id]) + first_source = filtered_sources.data[0] print(f"First source is: {first_source.label}") + print(f"Retrieved {len(filtered_sources.data)} sources via filtered API call") # Search for an entity search_term = "victoria beckham limited" diff --git a/tests/custom/test_sdk.py b/tests/custom/test_sdk.py index fd6f9940..d2d2a82d 100644 --- a/tests/custom/test_sdk.py +++ b/tests/custom/test_sdk.py @@ -45,7 +45,7 @@ def test_sources(setup_connection): client = setup_connection # list sources - sources = client.source.list_sources() + sources = client.ontology.get_sources() # We should have 250 sources as of 12/19/2023 assert len(sources.data) >= 250