SDK-NodeJS-bot-connector
Recast.AI official SDK in Node.js for bot connector
Synospis
This module is a wrapper around the Bot connector API, and allows you to connect your bot to any channels
Installation
npm install --save recastai-botconnector
Usage
Catch and reply
const Bot = const express = const bodyParser = /* server setup */const app = appappappapp /* setup bot */const myBot = botId: 'YOUR BOT ID' userSlug: 'YOUR USER SLUG' userToken: 'YOUR USER TOKEN' /* on new message */myBot
Push a message to one participant
const payload = type: 'text' content: 'Here is your pushed message' myBot
Broadcast a message to all participants
const payload = type: 'text' content: 'Here is a broadcast message' myBot
Documentation
You can find the full documentation here.
Specs
This module contains 2 classes, as follows:
- Bot is the client allowing you to catch messages sent to your bot
- Message is the class used for replies.
More
You can view the whole API reference at man.recast.ai.
Author
Bruno Gantelmi, bruno.gantelmi@recast.ai
You can follow us on Twitter at @recastai for updates and releases.
License
Copyright (c) [2016] Recast.AI
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.