Skip to content

Staff Target

qgendapy.resources.staff_target

StaffTargetResource(client)

Bases: BaseResource

Synchronous staff target endpoints.

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

list(*, odata=None)

Source code in src/qgendapy/resources/staff_target.py
def list(self, *, odata: OData | None = None) -> QGendaResponse:
    return self._get("/stafftarget", odata=odata)

create(*, data)

Source code in src/qgendapy/resources/staff_target.py
def create(self, *, data: dict) -> QGendaResponse:
    return self._post("/stafftarget", json=data)

update(*, data)

Source code in src/qgendapy/resources/staff_target.py
def update(self, *, data: dict) -> QGendaResponse:
    return self._put("/stafftarget", json=data)

delete(*, data)

Source code in src/qgendapy/resources/staff_target.py
def delete(self, *, data: dict) -> QGendaResponse:
    return self._delete("/stafftarget", json=data)

locations(staff_target_key)

Source code in src/qgendapy/resources/staff_target.py
def locations(self, staff_target_key: str) -> QGendaResponse:
    return self._get(f"/stafftarget/{staff_target_key}/location")

add_location(staff_target_key, location_key)

Source code in src/qgendapy/resources/staff_target.py
def add_location(self, staff_target_key: str, location_key: str) -> QGendaResponse:
    return self._post(f"/stafftarget/{staff_target_key}/location/{location_key}")

remove_location(staff_target_key, location_key)

Source code in src/qgendapy/resources/staff_target.py
def remove_location(self, staff_target_key: str, location_key: str) -> QGendaResponse:
    return self._delete(f"/stafftarget/{staff_target_key}/location/{location_key}")

profiles(staff_target_key)

Source code in src/qgendapy/resources/staff_target.py
def profiles(self, staff_target_key: str) -> QGendaResponse:
    return self._get(f"/stafftarget/{staff_target_key}/profile")

staff(staff_target_key)

Source code in src/qgendapy/resources/staff_target.py
def staff(self, staff_target_key: str) -> QGendaResponse:
    return self._get(f"/stafftarget/{staff_target_key}/staff")

add_staff(staff_target_key, staff_key, *, data=None)

Source code in src/qgendapy/resources/staff_target.py
def add_staff(
    self, staff_target_key: str, staff_key: str, *, data: dict | None = None
) -> QGendaResponse:
    return self._post(f"/stafftarget/{staff_target_key}/staff/{staff_key}", json=data)

update_staff(staff_target_key, staff_key, *, data)

Source code in src/qgendapy/resources/staff_target.py
def update_staff(self, staff_target_key: str, staff_key: str, *, data: dict) -> QGendaResponse:
    return self._put(f"/stafftarget/{staff_target_key}/staff/{staff_key}", json=data)

remove_staff(staff_target_key, staff_key)

Source code in src/qgendapy/resources/staff_target.py
def remove_staff(self, staff_target_key: str, staff_key: str) -> QGendaResponse:
    return self._delete(f"/stafftarget/{staff_target_key}/staff/{staff_key}")

task_shifts(staff_target_key)

Source code in src/qgendapy/resources/staff_target.py
def task_shifts(self, staff_target_key: str) -> QGendaResponse:
    return self._get(f"/stafftarget/{staff_target_key}/taskshift")

add_task_shift(staff_target_key, *, data)

Source code in src/qgendapy/resources/staff_target.py
def add_task_shift(self, staff_target_key: str, *, data: dict) -> QGendaResponse:
    return self._post(f"/stafftarget/{staff_target_key}/taskshift", json=data)

remove_task_shift(staff_target_key, task_shift_key)

Source code in src/qgendapy/resources/staff_target.py
def remove_task_shift(self, staff_target_key: str, task_shift_key: str) -> QGendaResponse:
    return self._delete(f"/stafftarget/{staff_target_key}/taskshift/{task_shift_key}")

AsyncStaffTargetResource(client)

Bases: AsyncBaseResource

Asynchronous staff target endpoints.

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

list(*, odata=None) async

Source code in src/qgendapy/resources/staff_target.py
async def list(self, *, odata: OData | None = None) -> QGendaResponse:
    return await self._get("/stafftarget", odata=odata)

create(*, data) async

Source code in src/qgendapy/resources/staff_target.py
async def create(self, *, data: dict) -> QGendaResponse:
    return await self._post("/stafftarget", json=data)

update(*, data) async

Source code in src/qgendapy/resources/staff_target.py
async def update(self, *, data: dict) -> QGendaResponse:
    return await self._put("/stafftarget", json=data)

delete(*, data) async

Source code in src/qgendapy/resources/staff_target.py
async def delete(self, *, data: dict) -> QGendaResponse:
    return await self._delete("/stafftarget", json=data)

locations(staff_target_key) async

Source code in src/qgendapy/resources/staff_target.py
async def locations(self, staff_target_key: str) -> QGendaResponse:
    return await self._get(f"/stafftarget/{staff_target_key}/location")

add_location(staff_target_key, location_key) async

Source code in src/qgendapy/resources/staff_target.py
async def add_location(self, staff_target_key: str, location_key: str) -> QGendaResponse:
    return await self._post(f"/stafftarget/{staff_target_key}/location/{location_key}")

remove_location(staff_target_key, location_key) async

Source code in src/qgendapy/resources/staff_target.py
async def remove_location(self, staff_target_key: str, location_key: str) -> QGendaResponse:
    return await self._delete(f"/stafftarget/{staff_target_key}/location/{location_key}")

profiles(staff_target_key) async

Source code in src/qgendapy/resources/staff_target.py
async def profiles(self, staff_target_key: str) -> QGendaResponse:
    return await self._get(f"/stafftarget/{staff_target_key}/profile")

staff(staff_target_key) async

Source code in src/qgendapy/resources/staff_target.py
async def staff(self, staff_target_key: str) -> QGendaResponse:
    return await self._get(f"/stafftarget/{staff_target_key}/staff")

add_staff(staff_target_key, staff_key, *, data=None) async

Source code in src/qgendapy/resources/staff_target.py
async def add_staff(
    self, staff_target_key: str, staff_key: str, *, data: dict | None = None
) -> QGendaResponse:
    return await self._post(f"/stafftarget/{staff_target_key}/staff/{staff_key}", json=data)

update_staff(staff_target_key, staff_key, *, data) async

Source code in src/qgendapy/resources/staff_target.py
async def update_staff(
    self, staff_target_key: str, staff_key: str, *, data: dict
) -> QGendaResponse:
    return await self._put(f"/stafftarget/{staff_target_key}/staff/{staff_key}", json=data)

remove_staff(staff_target_key, staff_key) async

Source code in src/qgendapy/resources/staff_target.py
async def remove_staff(self, staff_target_key: str, staff_key: str) -> QGendaResponse:
    return await self._delete(f"/stafftarget/{staff_target_key}/staff/{staff_key}")

task_shifts(staff_target_key) async

Source code in src/qgendapy/resources/staff_target.py
async def task_shifts(self, staff_target_key: str) -> QGendaResponse:
    return await self._get(f"/stafftarget/{staff_target_key}/taskshift")

add_task_shift(staff_target_key, *, data) async

Source code in src/qgendapy/resources/staff_target.py
async def add_task_shift(self, staff_target_key: str, *, data: dict) -> QGendaResponse:
    return await self._post(f"/stafftarget/{staff_target_key}/taskshift", json=data)

remove_task_shift(staff_target_key, task_shift_key) async

Source code in src/qgendapy/resources/staff_target.py
async def remove_task_shift(
    self, staff_target_key: str, task_shift_key: str
) -> QGendaResponse:
    return await self._delete(f"/stafftarget/{staff_target_key}/taskshift/{task_shift_key}")