Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

typo

  • Loading branch information...
commit dece2a4b8ac642931ccb11d5f0121ae551367f72 1 parent 005eddb
kuno authored
Showing with 10 additions and 16 deletions.
  1. +1 −0  .npmignore
  2. +5 −11 index.js
  3. +3 −4 lib/feed.js
  4. +1 −1  package.json
View
1  .npmignore
@@ -0,0 +1 @@
+test/*
View
16 index.js
@@ -1,17 +1,11 @@
var fs = require('fs'),
path = require('path');
-var User = require('./lib/user.js'),
- Feed = require('./lib/feed.js'),
- Point = require('./lib/point.js'),
- Stream = require('./lib/stream.js'),
- Trigger = require('./lib/trigger.js');
-
-exports.User = User;
-exports.Feed = Feed;
-exports.Point = Point;
-exports.Stream = Stream;
-exports.Trigger = Trigger;
+exports.User = require('./lib/user.js');
+exports.Feed = require('./lib/feed.js');
+exports.Point = require('./lib/point.js');
+exports.Stream = require('./lib/stream.js');
+exports.Trigger = require('./lib/trigger.js');
exports.version = JSON.parse(fs.readFileSync(path.join(__dirname, './package.json'))).version;
exports.apiVersion = require('./include/meta.js').apiVersion;
View
7 lib/feed.js
@@ -169,11 +169,10 @@ Feed.prototype.deleteKey = function(id, keyID, callback) {
* @param {string} optionalDataFormat Optional data format parameter, could be json or xml.
*/
Feed.prototype.history = function(id, start, end, interval, callback, optionalDataFormat) {
- var date = new Date();
- var parameters = {};
+ var date = new Date(), parameters = {};
parameters.start = start ? start : date.toISOString();
- parameters.end = end ? end : data.toISOString();
- parameters.interval = interval ? interval : 0;
+ parameters.end = end ? end : date.toISOString();
+ parameters.interval = interval ? parseInt(interval, 10) : 0;
var options = makeHistoryOptions('GET', this, id.toString(), parameters);
var dataFormat = optionalDataFormat || defaultDataFormat;
View
2  package.json
@@ -1,7 +1,7 @@
{
"name":"pachube",
"description": "A simple wrapper for api.pachube.com",
- "version":"0.0.1",
+ "version":"0.0.2pre",
"homepage":"http://api.pachube.com",
"author":"Guan 'kuno' Qing <neokuno AT Gmail DOT com>",
"contributions":[],
Please sign in to comment.
Something went wrong with that request. Please try again.