Skip to content

Commit ef176a6

Browse files
Removed socket on error handler. This was probably initialy put in place to deal with issues resulting from issue #2...
Removed socket on error handler. This was probably initialy put in place to deal with issues resulting from issue #2 before I know what they were. Bumped version as it appears this is now being used in production by myself and others and I have not intention of changing the API at this point.
1 parent cb42c4a commit ef176a6

File tree

4 files changed

+7
-15
lines changed

4 files changed

+7
-15
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
====================
33
[![Build Status](https://secure.travis-ci.org/framingeinstein/node-alchemy.png)](http://travis-ci.org/framingeinstein/node-alchemy)
44

5-
This module provides calls to the [Alchemy](http://www.alchemyapi.com/) API for [Nodejs](http://nodejs.org).
6-
For more information on the API request and responses visit the [Alchemy API docs](http://www.alchemyapi.com/api/). To use the module you will need to obtain an api key from [Alchemy](http://www.alchemyapi.com/api/register.html).
5+
This module provides calls to the [AlchemyAPI](http://www.alchemyapi.com/) for [Nodejs](http://nodejs.org).
6+
For more information on the API request and responses visit the [AlchemyAPI docs](http://www.alchemyapi.com/api/). To use the module you will need to obtain an api key from [Alchemy](http://www.alchemyapi.com/api/register.html).
77

88
Installation
99
------------

index.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,6 @@ AlchemyAPI.prototype._doRequest = function(request_query, cb) {
118118
});
119119

120120
});
121-
//console.dir(req);
122-
//req.setEncoding("utf8");
123-
req.on('socket', function(socket) {
124-
socket.on('error', function(err) {
125-
//console.log('socket error : ' + err);
126-
//cb(new Error("socket.error: " + err), null)
127-
});
128-
});
129121

130122
req.on("error", function (err) {
131123
cb(new Error("request.error: " + err), null);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "alchemy-api",
33
"description": "An Alchemy API library for Node.js",
44
"tags": ["Alchemy", "Natural Language Processing", "util"],
5-
"version": "0.9.0",
5+
"version": "1.0.0",
66
"author": "Jason Morgan <jason@framingeinstein.com>",
77
"contributors": [
88
],

test/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module.exports = {
3636
'get concepts': function(test) {
3737
var alchemy = new Alchemy(apikey);
3838
alchemy.concepts(testURL, {}, function(error, result) {
39-
39+
console.log(result);
4040
test.ifError(error);
4141
//test.deepEqual(result.status, "OK");
4242
test.done();
@@ -45,7 +45,7 @@ module.exports = {
4545
'get entities': function(test) {
4646
var alchemy = new Alchemy(apikey);
4747
alchemy.entities(testURL, {}, function(error, result) {
48-
48+
console.log(result);
4949
test.ifError(error);
5050
//test.deepEqual(result.status, "OK");
5151
test.done();
@@ -54,7 +54,7 @@ module.exports = {
5454
'get keywords': function(test) {
5555
var alchemy = new Alchemy(apikey);
5656
alchemy.keywords(testURL, {}, function(error, result) {
57-
57+
console.log(result);
5858
test.ifError(error);
5959
//test.deepEqual(result.status, "OK");
6060
test.done();
@@ -63,7 +63,7 @@ module.exports = {
6363
'get russian keywords': function(test) {
6464
var alchemy = new Alchemy(apikey);
6565
alchemy.keywords("http://www.framingeinstein.com/russian.html", {}, function(error, result) {
66-
//console.log(result);
66+
console.log(result);
6767
test.ifError(error);
6868
//test.deepEqual(result.status, "OK");
6969
test.done();

0 commit comments

Comments
 (0)