CohortsResource
Cohort API methods.
Cohort API methods.
Functions
constructor__init__(client) -> NoneInitialize the resource.
paramclientKitaruAPIClientAPI client used to send requests.
Returns
Nonefunccreate(request, idempotency_key=None) -> CohortResponseCreate a cohort.
paramrequestCohortCreateRequestCohort create request.
paramidempotency_keystr | None= NoneIdempotency key overriding the transport's random default.
Returns
kitaru.api_models.v1.cohort.CohortResponseCreated cohort.
funcget(cohort_id) -> CohortResponseGet a cohort by id.
paramcohort_iduuid.UUIDId of the cohort.
Returns
kitaru.api_models.v1.cohort.CohortResponseStored cohort.
funclist(params=None) -> Page[CohortResponse]List cohorts.
paramparamsCohortListParams | None= NoneCohort list params.
Returns
kitaru.api_models.v1.base.PagePage of cohorts.
funciter(params=None) -> AsyncIterator[CohortResponse]Iterate over all cohorts.
paramparamsCohortListParams | None= NoneCohort list params.
Returns
collections.abc.AsyncIteratorAsync iterator over every cohort.
funcupdate(cohort_id, request) -> CohortResponseUpdate a cohort's name and description.
paramcohort_iduuid.UUIDId of the cohort.
paramrequestCohortUpdateRequestCohort update request, unset fields stay unchanged.
Returns
kitaru.api_models.v1.cohort.CohortResponseUpdated cohort.
funcdelete(cohort_id) -> NoneDelete a cohort.
paramcohort_iduuid.UUIDId of the cohort.
Returns
Nonefunccreate_version(cohort_id, request, idempotency_key=None) -> CohortVersionResponseCreate a new version of a cohort.
paramcohort_iduuid.UUIDId of the cohort.
paramrequestCohortVersionCreateRequestCohort version create request.
paramidempotency_keystr | None= NoneIdempotency key overriding the transport's random default.
Returns
kitaru.api_models.v1.cohort_version.CohortVersionResponseCreated cohort version.
funclist_versions(cohort_id, params=None) -> Page[CohortVersionResponse]List the versions of a cohort.
paramcohort_iduuid.UUIDId of the cohort.
paramparamsCohortVersionListParams | None= NoneCohort version list params.
Returns
kitaru.api_models.v1.base.PagePage of cohort versions.
funciter_versions(cohort_id, params=None) -> AsyncIterator[CohortVersionResponse]Iterate over every version of a cohort.
paramcohort_iduuid.UUIDId of the cohort.
paramparamsCohortVersionListParams | None= NoneCohort version list params.
Returns
collections.abc.AsyncIteratorAsync iterator over every version of the cohort.