Skip to content

Commit

Permalink
Removed socket on error handler. This was probably initialy put in pl…
Browse files Browse the repository at this point in the history
…ace 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.
  • Loading branch information
framingeinstein committed Jun 27, 2013
1 parent cb42c4a commit ef176a6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 15 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
====================
[![Build Status](https://secure.travis-ci.org/framingeinstein/node-alchemy.png)](http://travis-ci.org/framingeinstein/node-alchemy)

This module provides calls to the [Alchemy](http://www.alchemyapi.com/) API for [Nodejs](http://nodejs.org).
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).
This module provides calls to the [AlchemyAPI](http://www.alchemyapi.com/) for [Nodejs](http://nodejs.org).
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).

Installation
------------
Expand Down
8 changes: 0 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,6 @@ AlchemyAPI.prototype._doRequest = function(request_query, cb) {
});

});
//console.dir(req);
//req.setEncoding("utf8");
req.on('socket', function(socket) {
socket.on('error', function(err) {
//console.log('socket error : ' + err);
//cb(new Error("socket.error: " + err), null)
});
});

req.on("error", function (err) {
cb(new Error("request.error: " + err), null);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "alchemy-api",
"description": "An Alchemy API library for Node.js",
"tags": ["Alchemy", "Natural Language Processing", "util"],
"version": "0.9.0",
"version": "1.0.0",
"author": "Jason Morgan <[email protected]>",
"contributors": [
],
Expand Down
8 changes: 4 additions & 4 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module.exports = {
'get concepts': function(test) {
var alchemy = new Alchemy(apikey);
alchemy.concepts(testURL, {}, function(error, result) {

console.log(result);
test.ifError(error);
//test.deepEqual(result.status, "OK");
test.done();
Expand All @@ -45,7 +45,7 @@ module.exports = {
'get entities': function(test) {
var alchemy = new Alchemy(apikey);
alchemy.entities(testURL, {}, function(error, result) {

console.log(result);
test.ifError(error);
//test.deepEqual(result.status, "OK");
test.done();
Expand All @@ -54,7 +54,7 @@ module.exports = {
'get keywords': function(test) {
var alchemy = new Alchemy(apikey);
alchemy.keywords(testURL, {}, function(error, result) {

console.log(result);
test.ifError(error);
//test.deepEqual(result.status, "OK");
test.done();
Expand All @@ -63,7 +63,7 @@ module.exports = {
'get russian keywords': function(test) {
var alchemy = new Alchemy(apikey);
alchemy.keywords("http://www.framingeinstein.com/russian.html", {}, function(error, result) {
//console.log(result);
console.log(result);
test.ifError(error);
//test.deepEqual(result.status, "OK");
test.done();
Expand Down

0 comments on commit ef176a6

Please sign in to comment.