1.0.0 • Published 7 years ago

@orat.io/integration-sdk v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

node-integration-sdk

Install via NPM

npm install @orat.io/integration-sdk

How To Use It With Express.Js

const oratio = require('oratio');

app.use(oratio());

This will inject the oratio integrations fuctionality into the express.js response object.

Functions

function description
showHuman(boolean)
autoRespond(boolean)
autoRespond(boolean)
sendTrigger(string)
sendText(string)

Example

So see working examples, check out the example folder.

...

app.post('/', (req, res) => {
    res.sendText('hello');
});

...

response.sendText('hello') generates the needed json payload to response the user with 'hello'.

To process the request of the user, check out the default express.js request.body property.

It contains a json object that represents the users request input.

For more details visit api.orat.io to get more inforations about integrations.