AbstractCmsService
On this page
- AbstractCmsService ⇐
Abstract- AbstractCmsService()
- getCategories([options]) ⇒
Promise.<Array.<AbstractCmsCategory>, Error> - getCategory(categoryId, [options]) ⇒
Promise.<AbstractCmsCategory, Error> - getContents(categoryId, [options]) ⇒
Promise.<ContentList, Error> - getContent(contentId, [options]) ⇒
Promise.<Content, Error> - _getCategories([options]) ⇒
Promise.<Array.<AbstractCmsCategory>, Error> - _getCategory(categoryId, [options]) ⇒
Promise.<AbstractCmsCategory, Error> - _getContents(categoryId, [options]) ⇒
Promise.<ContentList, Error> - _getContent(contentId, [options]) ⇒
Promise.<Content, Error>
AbstractCmsService ⇐ Abstract
Kind: global abstract class
Extends: Abstract
Service:
- AbstractCmsService ⇐
Abstract- new AbstractCmsService()
- .getCategories([options]) ⇒
Promise.<Array.<AbstractCmsCategory>, Error> - .getCategory(categoryId, [options]) ⇒
Promise.<AbstractCmsCategory, Error> - .getContents(categoryId, [options]) ⇒
Promise.<ContentList, Error> - .getContent(contentId, [options]) ⇒
Promise.<Content, Error> - ._getCategories([options]) ⇒
Promise.<Array.<AbstractCmsCategory>, Error> - ._getCategory(categoryId, [options]) ⇒
Promise.<AbstractCmsCategory, Error> - ._getContents(categoryId, [options]) ⇒
Promise.<ContentList, Error> - ._getContent(contentId, [options]) ⇒
Promise.<Content, Error>
AbstractCmsService()
The CMS Service exposes the CMS Category Api
getCategories([options]) ⇒ Promise.<Array.<AbstractCmsCategory>, Error>
Retrieve the list of the root level categories
Kind: instance method of AbstractCmsService
Returns: Promise.<Array.<AbstractCmsCategory>, Error> - a list of cms categories
| Param | Type | Default | Description |
|---|---|---|---|
| [options] | Object | some options | |
| [options.force] | boolean | false | If true, don't use the cache |
| [options.duration] | number | | Duration in milliseconds before invalidation of cache (if null, $$maxAge value is used by default) |
getCategory(categoryId, [options]) ⇒ Promise.<AbstractCmsCategory, Error>
Retrieve a specific category by its id
Kind: instance method of AbstractCmsService
| Param | Type | Default | Description |
|---|---|---|---|
| categoryId | string | category id to get | |
| [options] | Object | some options | |
| [options.force] | boolean | false | If true, don't use the cache |
| [options.duration] | number | | Duration in milliseconds before invalidation of cache (if null, $$maxAge value is used by default) |
getContents(categoryId, [options]) ⇒ Promise.<ContentList, Error>
Retrieve contents of a given category id
Kind: instance method of AbstractCmsService
| Param | Type | Default | Description |
|---|---|---|---|
| categoryId | string | category id | |
| [options] | object | some options | |
| [options.start] | number | index of the first content to retrieve | |
| [options.number] | number | limit the number of content fetched | |
| [options.force] | boolean | false | If true, don't use the cache |
| [options.duration] | number | | Duration in milliseconds before invalidation of cache (if null, $$maxAge value is used by default) |
getContent(contentId, [options]) ⇒ Promise.<Content, Error>
Retrieve content details by it’s id
Kind: instance method of AbstractCmsService
Returns: Promise.<Content, Error> - Content details
| Param | Type | Default | Description |
|---|---|---|---|
| contentId | string | Id of a content | |
| [options] | Object | additional options | |
| [options.force] | boolean | false | If true, don't use the cache |
| [options.duration] | number | | Duration in milliseconds before invalidation of cache (if null, $$maxAge value is used by default) |
_getCategories([options]) ⇒ Promise.<Array.<AbstractCmsCategory>, Error>
Vendor implementation to get categories
Kind: instance abstract method of AbstractCmsService
Returns: Promise.<Array.<AbstractCmsCategory>, Error> - a list of cms categories
Access: protected
| Param | Type | Default | Description |
|---|---|---|---|
| [options] | Object | some options | |
| [options.force] | boolean | false | If true, don't use the cache |
_getCategory(categoryId, [options]) ⇒ Promise.<AbstractCmsCategory, Error>
Vendor implementation to retrieve a specific category by its id
Kind: instance abstract method of AbstractCmsService
Access: protected
| Param | Type | Default | Description |
|---|---|---|---|
| categoryId | string | category id to get | |
| [options] | Object | some options | |
| [options.force] | boolean | false | If true, don't use the cache |
_getContents(categoryId, [options]) ⇒ Promise.<ContentList, Error>
Vendor implementation to get contents for a given category
Kind: instance abstract method of AbstractCmsService
Access: protected
| Param | Type | Default | Description |
|---|---|---|---|
| categoryId | string | category id | |
| [options] | object | some options | |
| [options.force] | boolean | false | If true, don't use the cache |
_getContent(contentId, [options]) ⇒ Promise.<Content, Error>
Vendor implementation to get content detail for a given content id
Kind: instance abstract method of AbstractCmsService
Access: protected
| Param | Type | Default | Description |
|---|---|---|---|
| contentId | string | content id | |
| [options] | object | some options | |
| [options.force] | boolean | false | If true, don't use the cache |