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 CmsDocumentsResourcePublished 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.
| Parameter | Type | Kind | Default |
|---|---|---|---|
http | HttpClient | positional | |
tenantCode | String | positional |
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.
| Parameter | Type | Kind | Default |
|---|---|---|---|
collection | String | positional | |
params | QueryParams | optional positional | const {} |
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.
| Parameter | Type | Kind | Default |
|---|---|---|---|
collection | String | positional | |
slug | String | positional | |
params | QueryParams | optional positional | const {} |
Returns Future<Map<String, dynamic>>.
CmsReleaseNotesResource
class CmsReleaseNotesResourcePublished release notes. Reached through ovok.cms.releaseNotes.
Constructors
CmsReleaseNotesResource.new
CmsReleaseNotesResource(HttpClient http, String tenantCode)Built by Ovok; use ovok.cms.releaseNotes instead.
| Parameter | Type | Kind | Default |
|---|---|---|---|
http | HttpClient | positional | |
tenantCode | String | positional |
Methods
CmsReleaseNotesResource.list
Future<Page<JsonMap>> list([QueryParams params = const {}])Lists the release-notes collection, sorted by -publishedAt unless
params names a sort.
| Parameter | Type | Kind | Default |
|---|---|---|---|
params | QueryParams | optional positional | const {} |
Returns Future<Page<Map<String, dynamic>>>.
CmsResource
class CmsResourcePublished 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.
| Parameter | Type | Kind | Default |
|---|---|---|---|
http | HttpClient | positional | |
tenantCode | String | positional |
Properties
CmsResource.documents
final CmsDocumentsResource documentsPublished documents of any collection.
CmsResource.releaseNotes
final CmsReleaseNotesResource releaseNotesPublished 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.
| Parameter | Type | Kind | Default |
|---|---|---|---|
slug | String | positional | |
params | QueryParams | optional positional | const {} |
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.
| Parameter | Type | Kind | Default |
|---|---|---|---|
locale | String? | optional positional |
Returns Future<Map<String, dynamic>>.
Last updated on