FluroTypes

FluroTypes

new FluroTypes(fluro)

Source:
Creates a new FluroTypes service This module provides a number of helpful functions for retrieving, translating and understanding types, schemas and definitions that are defined within Fluro
Parameters:
Name Type Description
fluro FluroCore A reference to the parent instance of the FluroCore module. This module is usually created by a FluroCore instance that passes itself in as the first argument.

Methods

(static) all(options) → {promise}

Source:
Retrieves all definitions available in the current account. Useful for making one request and caching
Parameters:
Name Type Description
options object extra options for the request
Returns:
An promise that will resolve to the array of definitions
Type
promise

(static) get(definedName, options) → {promise}

Source:
Retrieves a specified definition or primitive type object
Parameters:
Name Type Description
definedName string The definition or type name you want to retrieve
options object extra options for the request
Returns:
An promise that will resolve to the type definition from Fluro
Type
promise

(static) readable(definitionName, plural) → {String}

Source:
Input a definition name or basic type and receive the human readable version of that type
Parameters:
Name Type Description
definitionName String The definition or _type
plural Boolean Whether to return it's plural version
Returns:
Eg. 'Audio', 'Detail Sheet', or 'Events'...
Type
String

(static) reloadTerminology() → {promise}

Source:
Retrieves a glossary of terms for readable definition titles and plurals
Returns:
An promise that will resolve to the matching basic types or reject with the responding error
Type
promise

(static) retrieve(types) → {promise}

Source:
Retrieves a list of specified types and their respective definitions
Parameters:
Name Type Description
types array The names of the basic types you want to retrieve
Returns:
An promise that will resolve to the matching basic types or reject with the responding error
Type
promise