refactor(so-connector): optimize api calls with $select and filtering [31188f42]
This commit is contained in:
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user