Members
(static) terms
- Source:
Retrieves all definitions available in the current account. Useful for making one request and caching
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) basicTypes() → {Array}
- Source:
Retrieve an array of all basic types
Returns:
eg. 'service', 'concert', 'conference'
- Type
- Array
(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) mapDefinitionItems(array, baseType) → {Array}
- Source:
A helpful function for mapping an array of items into a grouped array broken up by definition
Example
//Returns {something:[{title:'Demographic', plural:'Demographics', key:'demographic', entries:[{...},{...}]}]}
fluro.types.mapDefinitionItems([{title:'test', definition:'demographic'}], 'tag');
Parameters:
Name | Type | Description |
---|---|---|
array |
Array | An array of content items |
baseType |
String | The default base type to map, eg. 'tag', 'contact', 'event' |
Returns:
A mapped array broken up by definition
- Type
- Array
(static) parentType(definitionName) → {String}
- Source:
Input a definition name or basic type and receive the most basic _type of that definition
Parameters:
Name | Type | Description |
---|---|---|
definitionName |
String | The definition or _type |
Returns:
Eg. 'photo', 'service', or 'song'...
- Type
- String
(static) postableTypes(definitionName, options) → {Array}
- Source:
Input a definition name or basic type and receive the most basic _type of that definition
Parameters:
Name | Type | Description |
---|---|---|
definitionName |
String | The definition or _type |
options |
Object | Extra options |
Returns:
an array of definitions that can be posted
- Type
- Array
(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 glossary 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
(static) subTypes(definitionName, includeBasicType) → {Array}
- Source:
Input a definition name or basic type and receive the most basic _type of that definition
Parameters:
Name | Type | Description |
---|---|---|
definitionName |
String | The basic _type |
includeBasicType |
Boolean | Whether to include the basic type definition in the results |
Returns:
eg. 'service', 'concert', 'conference'
- Type
- Array
(static) term(definitionName) → {Object}
- Source:
Input a definition name or basic type and receive the basic details about that definition
Parameters:
Name | Type | Description |
---|---|---|
definitionName |
String | The definition or _type |
Returns:
The details about this definition as defined in the glossary
- Type
- Object