Skip to content

Tag

qgendapy.resources.tag

TagResource(client)

Bases: BaseResource

Synchronous tag endpoints.

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

list(*, odata=None)

List all tags in the company.

Requires an admin-scoped QGenda account. Service accounts provisioned only for schedule reads will get a 401 with the message User does not have admin permission for any company. Catch :class:qgendapy.exceptions.APIError if you call this from code that may run under non-admin credentials.

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

    **Requires an admin-scoped QGenda account.** Service accounts
    provisioned only for schedule reads will get a 401 with the message
    ``User does not have admin permission for any company``. Catch
    :class:`qgendapy.exceptions.APIError` if you call this from code
    that may run under non-admin credentials.
    """
    return self._get("/tags", model=Tag, odata=odata)

AsyncTagResource(client)

Bases: AsyncBaseResource

Asynchronous tag 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:TagResource.list — requires admin scope.

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