Class: DDOAPI

DDOAPI()

DDO API class with methods of fetching search results for ibm.com

Constructor

new DDOAPI()

Source:

Methods

(async, static) getAll() → {Promise.<*>}

Gets the full digitalData (DDO) object. Application should window.digitalData up-front, e.g. in a <script> tag in <head>. For quick developerment purpose, what ibm-common.js automatically populates can be used.

Source:
Returns:

Promise object

Type
Promise.<*>

(async, static) getLanguage() → {Promise.<*>}

Gets the locale for the current page based on the language set as metadata. Application should window.digitalData up-front, e.g. in a <script> tag in <head>. For quick developerment purpose, what ibm-common.js automatically populates can be used.

Source:
Returns:

Promise object

Type
Promise.<*>

(async, static) getLocation() → {Promise.<*>}

Gets the country location of the user based on data populated by IBM analytics script. Application should window.digitalData up-front, e.g. in a <script> tag in <head>. For quick developerment purpose, what ibm-common.js automatically populates can be used.

Source:
Returns:

Promise object

Type
Promise.<*>

(static) isReady() → {Promise}

Promise function that determines when the digital data object is ready

Source:
Returns:

Resolved data layer ready signal

Type
Promise

(async, static) setVersion() → {Promise.<any>}

Sets the version of the library to the DDO. Application should window.digitalData up-front, e.g. in a <script> tag in <head>. For quick developerment purpose, what ibm-common.js automatically populates can be used.

Source:
Returns:

Promise object

Type
Promise.<any>