1.7.3 • Published 9 months ago

avaamo-customchannel v1.7.3

Weekly downloads
-
License
ISC
Repository
-
Last release
9 months ago

Avaamo custom channel integration

A module to help with custom channel implementation for Avaamo

Installation

Current stable release (1.3.x)

$ npm install avaamo-customchannel

Loading and configuring the module

const { Avaamo } = require('avaamo-customchannel');

Usage

NOTE: The documentation below is up-to-date with 1.x.x releases

// User details
var userId = 'john.doe@gmail.com';
var fname = 'John';
var lname = 'Doe';

// Get the channel webhook URL and the channel UUID from the custom channel settings
var channelWebhook = 'https://c*.avaamo.com//bot_connector_webhooks/7086c1cb-c055-4981-81c9-9e0b9fd8166a/message.json';
var channelUuid = 'b3024f50-2116-47b2-8e28-10c0feb08270';

// Initialize the channel
var avaamo = new Avaamo(userId, channelWebhook, channelUuid, fname, lname);

avaamo.query('hello there').then(responses => console.log(responses));

Parser

Parser is a useful class that can help you parse the JSON response from avaamo.query() into structured classes. You will need to import the Parser class in addition to the Avaamo class

const { Avaamo, Parser } = require('avaamo-customchannel');

// Initialize the channel
var avaamo = new Avaamo(userId, channelWebhook, channelUuid, fname, lname);

// Query the channel and parse the response
avaamo.query('hello there').then((responses) => {
        for (let i = 0; i < responses.length; i++) {
            let parser = new Parser(responses[i]);
            let reply = parser.parse();
            console.log(reply);
        }
    });

Other parsers

1.7.3

9 months ago

1.7.2

2 years ago

1.7.1

3 years ago

1.7.0

3 years ago

1.6.3

3 years ago

1.6.2

3 years ago

1.6.1

3 years ago

1.6.0

3 years ago

1.5.9

4 years ago

1.5.8

4 years ago

1.5.7

4 years ago

1.5.6

4 years ago

1.5.5

4 years ago

1.5.4

4 years ago

1.5.3

4 years ago

1.5.2

4 years ago

1.5.1

4 years ago

1.5.0

4 years ago

1.4.3

4 years ago

1.4.2

4 years ago

1.4.1

4 years ago

1.4.0

4 years ago

1.3.12

4 years ago

1.3.10

4 years ago

1.3.11

4 years ago

1.3.9

4 years ago

1.3.8

4 years ago

1.3.7

4 years ago

1.3.6

4 years ago

1.3.4

4 years ago

1.3.3

4 years ago

1.3.2

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago