Botsociety API Node Client
Npm module to retrieve automagically the content of your designs from botsociety.io
Quick start
npm install
Retrieve your User Id and API key from the API panel in Botsociety. Once you have the credentials:
var config = userId: processenvUSER_ID apiKey: processenvAPI_KEYvar botsociety = configbotsociety
A more detailed example of your conversation data.
Example of a structure of a message object:
var botsociety = configbotsociety
Example of an intentsInfo object, that contains the data to train your NLP engine and for your dialog manager:
Object})
For an example of the conversation object, refer to the documentation.
API Documentation
You can find here the full API Reference
Get your user ID and API key
Sign up at botsociety.io (it's free!)
Go to the account page to generate the API key.
Building a Custom Integration
With the Botsociety API, you can build a custom Botsociety Export. It will to export your Botsociety designs to a bot building solution. You can build a custom integration for your organisation, or you can submit one to be published on Botsociety. The Botsociety team will review your custom integration and then add it to Botsociety. Learn more about publishing integrations here.
If you are interested in building a Custom Integration, a good place to start is the custom integration boiler plate.
Current integrations include:
Legacy API
The legacy API is available for the designs created on Botsociety1. The Legacy API is still supported but it will not receive new updates. If you are looking to build a new integration, you should use the new API for Botsociety2.
To use the Legacy (Botsociety1) API:
var botsociety = configlegacy
Then call the usual methods:
botsocietybotsociety
Available methods:
- auth()
- createConversation()
- getConversations()
- getConversations(conversationId)
- deleteConversation(conversationId)
- addMessage(conversationId, messageId)
- linkMessage(conversationId, body)
- unlinkMessage(conversationId, body)
- getMessageByConversation(conversationId, messageId)
- deleteMessage(conversationId, messageId)
- addVariables(conversationId, body)
- getVariables(conversationId)
For more information, check out the Legacy API Reference
License (ISC)
See the LICENSE file for details.
Contributing
We love pull requests from everyone. In general, we follow the "fork-and-pull" Git workflow.
- Fork the repo on GitHub
- Clone the project to your own machine
- Commit changes to your own branch
- Push your work back up to your fork
- Submit a Pull request so that we can review your changes
At this point you're waiting on us. We like to at least comment on pull requests within three business days (and, typically, one business day). We may suggest some changes or improvements or alternatives.
Remember to write a good commit message.
NOTE: Be sure to merge the latest version before making a pull request!