New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cleverbot-node

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cleverbot-node - npm Package Compare versions

Comparing version 0.2.5 to 0.2.6

17

lib/cleverbot.js

@@ -72,2 +72,17 @@ var crypto = require('crypto')

configure: function (options){
options = options || {};
this.botapi = options.botapi;
},
path: function(){
var path = '/webservicemin?uc=3210&';
if(this.botapi) {
path += ['botapi',this.botapi].join("=");
} else {
path += 'botapi=CHANGEME'
}
return path;
},
write: function (message, callback) {

@@ -92,3 +107,3 @@ var clever = this;

port: 80,
path: '/webservicemin?uc=321&',
path: this.path(),
method: 'POST',

@@ -95,0 +110,0 @@ headers: {

2

package.json

@@ -5,3 +5,3 @@ {

"description": "Cleverbot client for node.js",
"version": "0.2.5",
"version": "0.2.6",
"contributors": [

@@ -8,0 +8,0 @@ {

@@ -20,2 +20,19 @@ # Cleverbot-node

With API Key:
The unofficial cleverbot api requests can optionally contain an API key. Information can be found here: http://www.cleverbot.com/apis
In order to add your key to your bot, you can use the `configure` method.
```
var Cleverbot = require('cleverbot-node');
cleverbot = new Cleverbot;
cleverbot.configure({botapi: "IAMKEY"});
Cleverbot.prepare(function(){
cleverbot.write(cleverMessage, function (response) {
alert(response.message);
});
});
```
See 'examples' for more usage.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc