@plasma-platform/service-properties
v0.5.0
Published
SDK for properties service
Downloads
14
Readme
Full documentation
install:npm i @plasma-platform/service-properties -S
Short documentation
Table of Contents
PropertiesService
Properties Micro Service API that you may adopt for your needs
Parameters
url
string service url
messages
Object with class service messages
Type: Object
get
Get properties list
Examples
Read properties list
(async () => {
const propertiesService = new PropertiesService('https://api.templatemonsterdev.com/properties/v1/');
const list = await propertiesService.get();
})();
Returns PropertiesList array of properties
details
Get specific propertie
Parameters
name
number propertie name
Examples
Get propertie
(async () => {
const propertiesService = new PropertiesService('https://api.templatemonsterdev.com/properties/v1/');
const details = await propertiesService.details('softwareRequired');
})();
Returns Propertie propertie
propertiesTree
Get properties by nesting level
Parameters
Examples
Get properties tree
(async () => {
const propertiesService = new PropertiesService('https://api.templatemonsterdev.com/properties/v1/');
const valuesTree = await propertiesService.valuesTree('topic', {expand='path'});
})();
Returns Propertie property
getTopicsTree
Get topic tree properties
Examples
Get topic tree properties
(async () => {
const propertiesService = new PropertiesService(serviceUrl);
const valuesTree = await propertiesService.getTopicsTree();
})();
Returns object topic tree
getTopicsTreeByTag
Get property's value tree by tag
Examples
Get topic tree properties
(async () => {
const propertiesService = new PropertiesService(serviceUrl);
const valuesTree = await propertiesService.getTopicsTreeByTag(tagId);
})();
Returns object topic tree