Content resource
Generated reference for ovok_sdk: content resource.
- Stable unknown
- Release candidate since 0.1.0-rc.4
- Development since 0.1.0-dev.23+d339d81
ContentResource
class ContentResourceProject content items, by type, language and key. Reached through ovok.content.
Every request throws an OvokException subclass when it fails.
Constructors
ContentResource.new
ContentResource(HttpClient _http)Built by Ovok; use ovok.content instead.
| Parameter | Type | Kind | Default |
|---|---|---|---|
_http | HttpClient | positional |
Methods
ContentResource.search
Future<JsonMap> search(
String type,
String language, [
QueryParams params = const {},
])Searches the type items in language.
Calls GET cms/{type}/{language} with params.
| Parameter | Type | Kind | Default |
|---|---|---|---|
type | String | positional | |
language | String | positional | |
params | QueryParams | optional positional | const {} |
Returns Future<Map<String, dynamic>>.
ContentResource.retrieve
Future<JsonMap> retrieve(
String type,
String language,
String key,
)Retrieves one item. Calls GET cms/{type}/{language}/{key}.
| Parameter | Type | Kind | Default |
|---|---|---|---|
type | String | positional | |
language | String | positional | |
key | String | positional |
Returns Future<Map<String, dynamic>>.
ContentResource.create
Future<JsonMap> create(
String type,
String language,
JsonMap body,
)Creates an item. Calls POST cms/{type}/{language}.
| Parameter | Type | Kind | Default |
|---|---|---|---|
type | String | positional | |
language | String | positional | |
body | JsonMap | positional |
Returns Future<Map<String, dynamic>>.
ContentResource.update
Future<JsonMap> update(
String type,
String language,
String key,
JsonMap body,
)Replaces one item. Calls PUT cms/{type}/{language}/{key}.
| Parameter | Type | Kind | Default |
|---|---|---|---|
type | String | positional | |
language | String | positional | |
key | String | positional | |
body | JsonMap | positional |
Returns Future<Map<String, dynamic>>.
ContentResource.delete
Future<void> delete(
String type,
String language,
String key,
)Deletes one item. Calls DELETE cms/{type}/{language}/{key}.
| Parameter | Type | Kind | Default |
|---|---|---|---|
type | String | positional | |
language | String | positional | |
key | String | positional |
Returns Future<void>.
ContentResource.map
Future<JsonMap> map(
String type,
String language, [
QueryParams params = const {},
])Pairs each default-language item with its language translation.
Calls GET cms/{type}/map/{language} with params.
| Parameter | Type | Kind | Default |
|---|---|---|---|
type | String | positional | |
language | String | positional | |
params | QueryParams | optional positional | const {} |
Returns Future<Map<String, dynamic>>.
ContentResource.copyFromParent
Future<JsonMap> copyFromParent(
String type,
String language,
String key,
)Copies one item from the parent project.
Calls POST cms/{type}/{language}/{key}/copy-from-parent-project.
| Parameter | Type | Kind | Default |
|---|---|---|---|
type | String | positional | |
language | String | positional | |
key | String | positional |
Returns Future<Map<String, dynamic>>.
ContentResource.copyAllFromParent
Future<JsonMap> copyAllFromParent(String type, String language)Copies every type item in language from the parent project.
Calls POST cms/{type}/{language}/copy-from-parent-project.
| Parameter | Type | Kind | Default |
|---|---|---|---|
type | String | positional | |
language | String | positional |
Returns Future<Map<String, dynamic>>.
Last updated on