robo-js-sdk
roboAi API SDK
Last updated 22 days ago by francisco.castro .
ISC · Original npm · Tarball · package.json
$ cnpm install robo-js-sdk 
SYNC missed versions from official npm registry.

robo-js-sdk

Welcome to our robo-js-sdk tutorial.

What is this SDK for?

This is a Javascript SDK to for the ROBO.AI API.

Instalation

Node.js

robo-js-sdk is available on npm. To install it try:

$ npm install robo-js-sdk

Browsers

You can also use it within the browser, install via npm and use the roboAi-sdk.js file found within the download. For example:

<script src="./node_modules/robo-js-sdk/dist/roboAi.js"></script>

Usage

Import the library in your code, and then start a new roboAi to get new communication:

const config = {
	url: "<BACKEND_URL>",
	apikey:"<API_KEY>", //Generate this <API_KEY> on Api Keys management 
	basicAuth: {
		user: "<BASIC_AUTH_USERNAME>",
		psw: "<BASIC_AUTH_PASSWORD>"
	},
	assistant: {
		"uuid": "<DEFAULT_ASSISTANT_UUID>",
		"url": "<DEFAULT_ASSISTANT_URL>",
		"name": "<ASSISTANT_NAME>"
	},
	preferences: {
		"widgetTitle" : "<WIDGET_TITLE>",
		"backgroundPicture" : "<BACKGROUND_PICTURE>",
		"primaryColor" : "<PRIMARY_COLOR>",
		"secondaryColor": "<SECONDARY_COLOR>"
	}
};

const roboAi = new RoboAi(config);

You may to specify environment too (sandbox or production), and for that you'll use js url.

Services available


roboAi.getAssistants() // returns the available Assistants
startDialogue(assistantUuid) // returns the needed dialogueUuid
// use the dialogueUuid to sendMessage
const messageRequest = {
	"format": "TEXT_PLAIN",
	"message": "hello",
};
roboAi.sendMessage(dialogueUuid, messageRequest, acceptTypes.audioMp3);

Current Tags

  • 1.1.0                                ...           latest (22 days ago)

17 Versions

  • 1.1.0                                ...           22 days ago
  • 1.0.44                                ...           2 months ago
  • 1.0.43                                ...           2 months ago
  • 1.0.42                                ...           2 months ago
  • 1.0.41                                ...           2 months ago
  • 1.0.40                                ...           6 months ago
  • 1.0.39                                ...           6 months ago
  • 1.0.38                                ...           6 months ago
  • 1.0.37                                ...           7 months ago
  • 1.0.36                                ...           7 months ago
  • 1.0.35                                ...           7 months ago
  • 1.0.34                                ...           7 months ago
  • 1.0.33                                ...           7 months ago
  • 1.0.32                                ...           7 months ago
  • 1.0.31                                ...           7 months ago
  • 1.0.3                                ...           7 months ago
  • 1.0.0                                ...           7 months ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 10
Dependencies (6)
Dev Dependencies (9)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |