Skip to content

Commit

Permalink
lib to src
Browse files Browse the repository at this point in the history
  • Loading branch information
jschell12 committed Jul 4, 2013
1 parent f51d331 commit 9184b6f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions bin/index.js
@@ -1,5 +1,5 @@
#!/usr/bin/env node
var path = require('path');
var fs = require('fs');
var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib');
require(lib + '/shopsense.js');
var src = path.join(path.dirname(fs.realpathSync(__filename)), '../src');
require(src + '/shopsense.js');
4 changes: 3 additions & 1 deletion src/httpclient.js
@@ -1,7 +1,9 @@
var Future = require('future');
var request = require('request');
module.exports = function(url, future){
module.exports = function(url){
var future = new Future();
request.get({url:url, json:true}, function (e, r, d) {
future.deliver(d);
});
return future;
};
4 changes: 1 addition & 3 deletions src/shopsense.js
@@ -1,4 +1,3 @@
var Future = require('future');
var httpClient = require("./httpclient.js");

var ShopSense = (function () {
Expand Down Expand Up @@ -82,9 +81,8 @@ var ShopSense = (function () {
return future;
},
_get: function(url, params){
var future = new Future();
url += this._serialize(params);
_httpClient(url, future);
var future = _httpClient(url);
return future;
},
product: function(id) {
Expand Down

0 comments on commit 9184b6f

Please sign in to comment.