refactor(so-connector): optimize api calls with $select and filtering [31188f42]

This commit is contained in:
2026-02-24 12:38:14 +00:00
parent bf6cafe00d
commit 7b15c3f9f0
3 changed files with 24 additions and 12 deletions

View File

@@ -114,11 +114,17 @@ class SuperOfficeClient:
# --- Convenience Wrappers ---
def get_person(self, person_id):
return self._get(f"Person/{person_id}")
def get_person(self, person_id, select: list = None):
endpoint = f"Person/{person_id}"
if select:
endpoint += f"?$select={','.join(select)}"
return self._get(endpoint)
def get_contact(self, contact_id):
return self._get(f"Contact/{contact_id}")
def get_contact(self, contact_id, select: list = None):
endpoint = f"Contact/{contact_id}"
if select:
endpoint += f"?$select={','.join(select)}"
return self._get(endpoint)
def search(self, query_string: str):
"""