ContentHelper

A helper class for Content

getAllContents

Gets all Content objects

Parameters

project
String
environment
String

Returns

Promise
promise

getSlug

Gets a URL-friendly version of a string

Parameters

string
String
slug
String

getContentById

Gets a Content object by id

Parameters

project
String
environment
String
id
String

Returns

Promise
promise

setContentById

Sets a Content object by id

Parameters

project
String
environment
String
id
String
content
Content

Returns

Promise
promise

isSchemaAllowedAsChild

Checks if a Schema type is allowed as a child of a Content object

Parameters

project
String
environment
String
parentId
String
childSchemaId
String

Returns

Promise
Is the Content node allowed as a child

createContent

Creates a new content object

Parameters

Returns

Promise
promise

removeContentById

Removes a content object

Parameters

id
Number

Returns

Promise
promise