1.0.9 • Published 1 year ago
@orquestadev/browser v1.0.9
Orquesta Javascript SDK
Install
npm
npm install @orquestadev/browser
yarn
yarn add @orquestadev/browser
Usage
You can get your workspace API key from the settings section in your workspace.
In ES6/Typescript, import the OrquestaClient
class:
import { OrquestaClient } from '@orquestadev/browser';
For CommonJS, require the package:
const { OrquestaClient } = require('@orquestadev/browser');
Query a rule
const client = new OrquestaClient({
apiKey: 'my_workspace_api_key',
});
const result = await client.query('my_rule_key', 'my_default_value', {
environments: 'production',
});
Query a domain of rules
const client = new OrquestaClient({
apiKey: 'my_workspace_api_key',
});
const domainRules = await client.queryDomain('my_domain_key', {
environments: 'production',
});