CMS resource

Generated reference for ovok_sdk: cms resource.

  • Stable unknown
  • Release candidate since 0.1.0-rc.4
  • Development since 0.1.0-dev.23+d339d81

CmsDocumentsResource

class CmsDocumentsResource

Published documents of any CMS collection. Reached through ovok.cms.documents.

locale takes an app language ("de-DE") or a CMS locale ("de"); an unsupported language reads as "en".

Constructors

CmsDocumentsResource.new

CmsDocumentsResource(HttpClient http, String tenantCode)

Built by Ovok; use ovok.cms.documents instead.

ParameterTypeKindDefault
httpHttpClientpositional
tenantCodeStringpositional

Methods

CmsDocumentsResource.list

Future<Page<JsonMap>> list(String collection, [QueryParams params = const {}])

Lists the published documents of collection.

Calls GET v1/public/cms/collections/{collection}/items. params takes locale, page, limit and sort.

ParameterTypeKindDefault
collectionStringpositional
paramsQueryParamsoptional positionalconst {}

Returns Future<Page<Map<String, dynamic>>>.

CmsDocumentsResource.retrieve

Future<JsonMap> retrieve(
  String collection,
  String slug, [
  QueryParams params = const {},
])

Retrieves the document slug of collection.

Calls GET v1/public/cms/collections/{collection}/items/{slug}. Throws OvokValidationException when slug is empty.

ParameterTypeKindDefault
collectionStringpositional
slugStringpositional
paramsQueryParamsoptional positionalconst {}

Returns Future<Map<String, dynamic>>.

CmsReleaseNotesResource

class CmsReleaseNotesResource

Published release notes. Reached through ovok.cms.releaseNotes.

Constructors

CmsReleaseNotesResource.new

CmsReleaseNotesResource(HttpClient http, String tenantCode)

Built by Ovok; use ovok.cms.releaseNotes instead.

ParameterTypeKindDefault
httpHttpClientpositional
tenantCodeStringpositional

Methods

CmsReleaseNotesResource.list

Future<Page<JsonMap>> list([QueryParams params = const {}])

Lists the release-notes collection, sorted by -publishedAt unless params names a sort.

ParameterTypeKindDefault
paramsQueryParamsoptional positionalconst {}

Returns Future<Page<Map<String, dynamic>>>.

CmsResource

class CmsResource

Published CMS documents, legal pages and translations. Reached through ovok.cms.

Reads go to v1/public/cms/collections, always as the client's tenant, so they work before sign-in.

Every request throws an OvokException subclass when it fails.

Constructors

CmsResource.new

CmsResource(HttpClient http, String tenantCode)

Built by Ovok; use ovok.cms instead.

ParameterTypeKindDefault
httpHttpClientpositional
tenantCodeStringpositional

Properties

CmsResource.documents

final CmsDocumentsResource documents

Published documents of any collection.

CmsResource.releaseNotes

final CmsReleaseNotesResource releaseNotes

Published release notes, newest first.

Methods

CmsResource.legalPage

Future<JsonMap> legalPage(String slug, [QueryParams params = const {}])

Retrieves a legal page by slug, such as "terms-and-conditions" or "data-privacy".

Reads the legal-pages collection; readable before sign-in.

ParameterTypeKindDefault
slugStringpositional
paramsQueryParamsoptional positionalconst {}

Returns Future<Map<String, dynamic>>.

CmsResource.translations

Future<JsonMap> translations([String? locale])

Retrieves the translations collection as one tree, readable before sign-in.

Each document's slug is a group holding each row's value at its key, nested at the dots; the first row wins. Reads at most 20 pages of 50. Nothing is kept on the device.

ParameterTypeKindDefault
localeString?optional positional

Returns Future<Map<String, dynamic>>.

Last updated on

On this page