API referenceovok_sdk.resources
ovok_sdk.resources.cms_authoring
CMS authoring: the tenant's collections, read and written by a CMS editor.
- Stable unknown
- Release candidate not available
- Development since 0.2.0-dev.34+53a6a64
CMS authoring: the tenant's collections, read and written by a CMS editor.
CmsAuthoringResource
CmsAuthoringResource(http: HttpClient)Draft and published documents of the signed-in editor's tenant; access it as ovok.cms.authoring.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
http | HttpClient | The client's HTTP client. |
list()
list(
collection: str,
params: Mapping[str, Any] | None = None,
*,
options: RequestOptions | None = None,
) -> Page[Any]List a collection's documents.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
collection | str | The collection slug. | |
params | Mapping[str, Any] | None | None | Optional where ({field: {operator: value}}), page (1-based first page), limit, sort, depth and locale. |
options | RequestOptions | None | None | Per-request options; timeout overrides the client's. |
Returns
Page[Any]: A page of documents that loads later pages on demand.
Examples
>>> ovok.cms.authoring.list("faqs", {"where": {"status": {"equals": "draft"}}})retrieve()
retrieve(
collection: str,
document_id: int | str,
*,
options: RequestOptions | None = None,
) -> AnyRead one document by its ID.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
collection | str | The collection slug. | |
document_id | int | str | The document ID. | |
options | RequestOptions | None | None | Per-request options; timeout overrides the client's. |
Returns
Any: The document.
create()
create(
collection: str,
document: Mapping[str, Any],
*,
options: RequestOptions | None = None,
) -> AnyCreate a document.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
collection | str | The collection slug. | |
document | Mapping[str, Any] | The document's fields. | |
options | RequestOptions | None | None | Per-request options; timeout overrides the client's. |
Returns
Any: The created document.
update()
update(
collection: str,
document_id: int | str,
fields: Mapping[str, Any],
*,
options: RequestOptions | None = None,
) -> AnyChange some fields of a document.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
collection | str | The collection slug. | |
document_id | int | str | The document ID. | |
fields | Mapping[str, Any] | The fields to change. | |
options | RequestOptions | None | None | Per-request options; timeout overrides the client's. |
Returns
Any: The document after the change.
delete()
delete(
collection: str,
document_id: int | str,
*,
options: RequestOptions | None = None,
) -> NoneDelete a document.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
collection | str | The collection slug. | |
document_id | int | str | The document ID. | |
options | RequestOptions | None | None | Per-request options; timeout overrides the client's. |
Last updated on