Comparing version 0.1.3 to 0.1.4
@@ -65,4 +65,18 @@ var Utils = require('./utils'); | ||
Device.prototype.snapshots = function(fields, _options){ | ||
var self = this; | ||
Joi.assert(fields, Joi.array().min(1)); | ||
_options = Hoek.applyToDefaults({limit: 20}, _options || {}); | ||
Joi.assert(_options, Utils.streamPaginationOptions); | ||
_options.fields = fields.join(','); | ||
return Utils.request.get( | ||
'telemetry', | ||
'devices/'+self.id+'/snapshots', | ||
_options).then(function(resp){ | ||
return Utils.streamListResponse(resp, 'snapshots', self.snapshots, self); | ||
}); | ||
}; | ||
Device.prototype.locations = function(_options){ | ||
@@ -69,0 +83,0 @@ var self = this; |
{ | ||
"name": "vinli", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "Official Node.js SDK for interacting with the Vinli Platform", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Vinli Node.js SDK | ||
================= | ||
[![npm version](https://badge.fury.io/js/vinli.svg)](http://badge.fury.io/js/vinli) | ||
[![Build Status](https://travis-ci.org/vinli/vinli-node.svg)](https://travis-ci.org/vinli/vinli-node) | ||
@@ -19,3 +20,3 @@ | ||
var Vinli = require('vinli')({ | ||
appId: 'b3fcb3c2-0b7e-4c9a-a6a1-f53e365c2fd9' | ||
appId: 'b3fcb3c2-0b7e-4c9a-a6a1-f53e365c2fd9', | ||
secretKey: 'C023z8T6f39WSZrLSqqf' | ||
@@ -22,0 +23,0 @@ }); |
Sorry, the diff of this file is not supported yet
68970
1478
325