UNPKG

@c8y/client

Version:

Client application programming interface to access the Cumulocity IoT-Platform REST services.

45 lines 1.17 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FeatureService = void 0; const core_1 = require("../core"); /** * This class allows reading a feature toggles for current tenant. */ class FeatureService extends core_1.Service { constructor() { super(...arguments); this.baseUrl = ''; this.listUrl = 'features'; } /** * Retrieve list of feature toggles with values for current tenant. * * **Example** * ```typescript * * (async () => { * const {data, res} = await featureService.list(); * })(); * ``` */ async list() { return super.list(); } /** * Retrieve a specific feature toggle with value for current tenant. * * **Example** * ```typescript * * (async () => { * const featureToggleKey = 'my-custom-feature'; * const {data, res} = await featureService.detail(featureToggleKey); * })(); * ``` */ async detail(key) { return super.detail(key); } } exports.FeatureService = FeatureService; //# sourceMappingURL=FeatureService.js.map