cleverbot-node
Version:
Cleverbot client for node.js
29 lines (19 loc) • 866 B
Markdown
A node.js client for talking to cleverbot.
Basic usage:
In order to add your key to your bot, you can use the `configure` method. API keys can be obtained from the [Cleverbot API Sign Up Page](http://cleverbot.com/api).
```
var Cleverbot = require('cleverbot-node');
cleverbot = new Cleverbot;
cleverbot.configure({botapi: "IAMKEY"});
cleverbot.write(cleverMessage, function (response) {
console.log(response.output);
});
```
* API Key is now required
* `Cleverbot.prepare` call is no longer needed. It is now a noop for backwards compatibility
* The output of the bot is now in the `output` attribute of the response object. It is copied to `message` for backwards compatibility
* Cleverbot API sometimes returns an empty response attribute
See 'examples' for more usage.