Skip to content

Profile

qgendapy.resources.profile

ProfileResource(client)

Bases: BaseResource

Synchronous profile endpoints.

Source code in src/qgendapy/resources/_base.py
def __init__(self, client: QGendaClient) -> None:
    self._client = client

list(*, odata=None)

List all profiles in the company.

Requires an admin-scoped QGenda account. Service accounts provisioned only for schedule reads will get a 401 with the message No valid profile exists for user in company provided. Catch :class:qgendapy.exceptions.APIError if you call this from code that may run under non-admin credentials.

Source code in src/qgendapy/resources/profile.py
def list(self, *, odata: OData | None = None) -> QGendaResponse[Profile]:
    """List all profiles in the company.

    **Requires an admin-scoped QGenda account.** Service accounts
    provisioned only for schedule reads will get a 401 with the message
    ``No valid profile exists for user in company provided``. Catch
    :class:`qgendapy.exceptions.APIError` if you call this from code
    that may run under non-admin credentials.
    """
    return self._get("/profile", model=Profile, odata=odata)

AsyncProfileResource(client)

Bases: AsyncBaseResource

Asynchronous profile endpoints.

Source code in src/qgendapy/resources/_base.py
def __init__(self, client: AsyncQGendaClient) -> None:
    self._client = client

list(*, odata=None) async

Async version of :meth:ProfileResource.list — requires admin scope.

Source code in src/qgendapy/resources/profile.py
async def list(self, *, odata: OData | None = None) -> QGendaResponse[Profile]:
    """Async version of :meth:`ProfileResource.list` — requires admin scope."""
    return await self._get("/profile", model=Profile, odata=odata)