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