0.1.6 • Published 4 years ago

@botmock/utils v0.1.6

Weekly downloads
10
License
MIT
Repository
github
Last release
4 years ago

Botmock

Node.js CI

Monorepo for the Botmock SDK

Features

  • Fetch project data
  • Export projects into known platforms such as Bot Framework, Dialogflow, Watson, and Rasa
  • Export projects into custom platforms

Packages

Quickstart

Prerequisites

Using the client package for simple data fetching

The first step is to install the package.

npm install @botmock/client

Next, bring the package into your Node.js program's scope.

// index.ts
import { Client } from "@botmock/client";

The above Client class has method getResources which takes an object describing project resources to be fetched.

The options object contains the following.

Key nameTypeDescription
teamIdstringid of the team
projectIdstringid of the project
boardIdstring(optional) id of the board
resourcesstring[]array of "project", "team", "board", "intents", "variables", or "entities"

This promise resolves an object containing key, value pairs for each of resources.

Note: Tokens and ids are created and accessed using the Botmock dashboard

// index.ts
import { Client } from "@botmock/client";

const client = new Client({ token: process.env.TOKEN });

(async () => {
  const { intents, project, board } = await client.getResources({
    resources: ["intents", "project", "board"],
    teamId: "424242",
    projectId: "424242",
    boardId: "424242",
  });
})();

Next Steps

To see more of what the SDK is capable of, see README.md in each of the directories in /packages.

Development

  • npm install
  • npm run bootstrap
  • npm run tsc

Contributing

License