Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vinli

Package Overview
Dependencies
Maintainers
2
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vinli - npm Package Compare versions

Comparing version 1.4.1 to 2.0.0

6

lib/device.js

@@ -118,3 +118,3 @@ var Utils = require('./utils');

_options = Hoek.applyToDefaults({ limit: 20 }, _options || {});
Joi.assert(_options, Utils.paginationOptions);
Joi.assert(_options, Utils.streamPaginationOptions);

@@ -164,4 +164,4 @@ return client.get(

var self = this;
_options = Hoek.applyToDefaults({ offset: 0, limit: 20 }, _options || {});
Joi.assert(_options, Utils.paginationOptions);
_options = Hoek.applyToDefaults({ limit: 20 }, _options || {});
Joi.assert(_options, Utils.streamPaginationOptions);

@@ -168,0 +168,0 @@ return client.get(

@@ -14,4 +14,4 @@ var Utils = require('./utils');

_options = Hoek.applyToDefaults({ offset: 0, limit: 20 }, _options || {});
Joi.assert(_options, Utils.paginationOptions);
_options = Hoek.applyToDefaults({ limit: 20 }, _options || {});
Joi.assert(_options, Utils.streamPaginationOptions);

@@ -29,4 +29,4 @@ return client.get(

var self = this;
_options = Hoek.applyToDefaults({ offset: 0, limit: 20 }, _options || {});
Joi.assert(_options, Utils.paginationOptions);
_options = Hoek.applyToDefaults({ limit: 20 }, _options || {});
Joi.assert(_options, Utils.streamPaginationOptions);

@@ -41,4 +41,4 @@ return client.get('diagnostic', 'vehicles/' + this.id + '/codes', _options).then(function(resp) {

var self = this;
_options = Hoek.applyToDefaults({ offset: 0, limit: 20 }, _options || {});
Joi.assert(_options, Utils.paginationOptions);
_options = Hoek.applyToDefaults({ limit: 20 }, _options || {});
Joi.assert(_options, Utils.streamPaginationOptions);
_options = Hoek.merge({ state: 'active' }, _options);

@@ -54,4 +54,4 @@

var self = this;
_options = Hoek.applyToDefaults({ offset: 0, limit: 20 }, _options || {});
Joi.assert(_options, Utils.paginationOptions);
_options = Hoek.applyToDefaults({ limit: 20 }, _options || {});
Joi.assert(_options, Utils.streamPaginationOptions);
_options = Hoek.merge({ state: 'inactive' }, _options);

@@ -67,4 +67,4 @@

var self = this;
_options = Hoek.applyToDefaults({ offset: 0, limit: 20 }, _options || {});
Joi.assert(_options, Utils.paginationOptions);
_options = Hoek.applyToDefaults({ limit: 20 }, _options || {});
Joi.assert(_options, Utils.streamPaginationOptions);

@@ -71,0 +71,0 @@ return client.get(

{
"name": "vinli",
"version": "1.4.1",
"version": "2.0.0",
"description": "Official Node.js SDK for interacting with the Vinli Platform",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -425,3 +425,3 @@ var nock = require('nock');

var m = nock('https://safety.vin.li')
.get('/api/v1/devices/c4627b29-14bd-49c3-8e6a-1f857143039f/collisions?offset=0&limit=2')
.get('/api/v1/devices/c4627b29-14bd-49c3-8e6a-1f857143039f/collisions?limit=2')
.reply(200, {

@@ -447,9 +447,9 @@ collisions: [{

pagination: {
total: 3,
remaining: 0,
until: '2015-07-24T22:11:23.829Z',
since: '1970-01-01T00:00:00.000Z',
limit: 2,
offset: 0,
sortDir: 'desc',
links: {
first: 'http://172.17.0.114:3000/api/v1/devices/c4627b29-14bd-49c3-8e6a-1f857143039f/collisions?offset=0&limit=2',
last: 'http://172.17.0.114:3000/api/v1/devices/c4627b29-14bd-49c3-8e6a-1f857143039f/collisions?offset=0&limit=2',
next: 'http://172.17.0.114:3000/api/v1/devices/c4627b29-14bd-49c3-8e6a-1f857143039f/collisions?offset=2&limit=2'
prior: 'https://safety.vin.li/api/v1/devices/c4627b29-14bd-49c3-8e6a-1f857143039f/collisions?limit=2&until=1437778166267'
}

@@ -465,4 +465,3 @@ }

expect(collisions.list[0]).to.be.instanceOf(Vinli.Collision);
expect(collisions).to.have.property('total', 3);
expect(collisions).to.have.property('next').that.is.a('function');
expect(collisions).to.have.property('prior').that.is.a('function');

@@ -469,0 +468,0 @@ m.done();

@@ -76,4 +76,4 @@ var nock = require('nock');

it('should return a list of trips for the device', function() {
var m = nock('https://trips.vin.li/')
.get('/api/v1/vehicles/530f2690-63c0-11e4-86d8-7f2f26e5461e/trips?offset=0&limit=2')
var m = nock('https://trips.vin.li')
.get('/api/v1/vehicles/530f2690-63c0-11e4-86d8-7f2f26e5461e/trips?limit=2')
.reply(200, {

@@ -97,9 +97,9 @@ trips: [{

pagination: {
total: 748,
remaining: 746,
until: '2015-07-24T22:11:23.829Z',
since: '1970-01-01T00:00:00.000Z',
limit: 2,
offset: 0,
sortDir: 'desc',
links: {
first: 'http://trips-test.vin.li/api/v1/devices/c4627b29-14bd-49c3-8e6a-1f857143039f/trips?offset=0&limit=2',
last: 'http://trips-test.vin.li/api/v1/devices/c4627b29-14bd-49c3-8e6a-1f857143039f/trips?offset=746&limit=2',
next: 'http://trips-test.vin.li/api/v1/devices/c4627b29-14bd-49c3-8e6a-1f857143039f/trips?offset=2&limit=2'
prior: 'https://trips.vin.li/api/v1/vehicles/530f2690-63c0-11e4-86d8-7f2f26e5461e/trips?limit=2&until=1437778166267'
}

@@ -114,4 +114,3 @@ }

expect(trips.list[0]).to.be.instanceOf(Vinli.Trip);
expect(trips).to.have.property('total', 748);
expect(trips).to.have.property('next').that.is.a('function');
expect(trips).to.have.property('prior').that.is.a('function');

@@ -131,13 +130,13 @@ m.done();

var m = nock('https://diagnostic.vin.li')
.get('/api/v1/vehicles/fc8bdd0c-5be3-46d5-8582-b5b54052eca2/codes?offset=0&limit=3')
.get('/api/v1/vehicles/fc8bdd0c-5be3-46d5-8582-b5b54052eca2/codes?limit=3')
.reply(200, {
meta: {
pagination: {
total: 4,
remaining: 1,
until: '2015-07-24T22:11:23.829Z',
since: '1970-01-01T00:00:00.000Z',
limit: 3,
offset: 0,
sortDir: 'desc',
links: {
first: '/api/v1/vehicles/fec0bf34-eb4e-49e2-b17c-83e21ff5d03a/codes?limit=3&offset=0&sortDirection=desc',
next: '/api/v1/vehicles/fec0bf34-eb4e-49e2-b17c-83e21ff5d03a/codes?limit=3&offset=3&sortDirection=desc',
last: '/api/v1/vehicles/fec0bf34-eb4e-49e2-b17c-83e21ff5d03a/codes?limit=3&offset=3&sortDirection=desc'
prior: 'https://diagnostic.vin.li/api/v1/vehicles/fc8bdd0c-5be3-46d5-8582-b5b54052eca2/codes?limit=3&until=1437778166267'
}

@@ -164,4 +163,3 @@ }

expect(codes.list[0]).to.be.an.instanceOf(Vinli.Code);
expect(codes).to.have.property('total', 4);
expect(codes).to.have.property('next').that.is.a('function');
expect(codes).to.have.property('prior').that.is.a('function');
m.done();

@@ -180,13 +178,13 @@ });

var m = nock('https://diagnostic.vin.li')
.get('/api/v1/vehicles/fc8bdd0c-5be3-46d5-8582-b5b54052eca2/codes?state=active&offset=0&limit=3')
.get('/api/v1/vehicles/fc8bdd0c-5be3-46d5-8582-b5b54052eca2/codes?state=active&limit=3')
.reply(200, {
meta: {
pagination: {
total: 4,
remaining: 1,
until: '2015-07-24T22:11:23.829Z',
since: '1970-01-01T00:00:00.000Z',
limit: 3,
offset: 0,
sortDir: 'desc',
links: {
first: '/api/v1/vehicles/fec0bf34-eb4e-49e2-b17c-83e21ff5d03a/codes?limit=3&offset=0&sortDirection=desc',
next: '/api/v1/vehicles/fec0bf34-eb4e-49e2-b17c-83e21ff5d03a/codes?limit=3&offset=3&sortDirection=desc',
last: '/api/v1/vehicles/fec0bf34-eb4e-49e2-b17c-83e21ff5d03a/codes?limit=3&offset=3&sortDirection=desc'
prior: 'https://diagnostic.vin.li/api/v1/vehicles/fc8bdd0c-5be3-46d5-8582-b5b54052eca2/codes?state=active&limit=3&until=1437778166267'
}

@@ -213,4 +211,3 @@ }

expect(codes.list[0]).to.be.an.instanceOf(Vinli.Code);
expect(codes).to.have.property('total', 4);
expect(codes).to.have.property('next').that.is.a('function');
expect(codes).to.have.property('prior').that.is.a('function');
m.done();

@@ -229,13 +226,13 @@ });

var m = nock('https://diagnostic.vin.li')
.get('/api/v1/vehicles/fc8bdd0c-5be3-46d5-8582-b5b54052eca2/codes?state=inactive&offset=0&limit=3')
.get('/api/v1/vehicles/fc8bdd0c-5be3-46d5-8582-b5b54052eca2/codes?state=inactive&limit=3')
.reply(200, {
meta: {
pagination: {
total: 4,
remaining: 1,
until: '2015-07-24T22:11:23.829Z',
since: '1970-01-01T00:00:00.000Z',
limit: 3,
offset: 0,
sortDir: 'desc',
links: {
first: '/api/v1/vehicles/fec0bf34-eb4e-49e2-b17c-83e21ff5d03a/codes?limit=3&offset=0&sortDirection=desc',
next: '/api/v1/vehicles/fec0bf34-eb4e-49e2-b17c-83e21ff5d03a/codes?limit=3&offset=3&sortDirection=desc',
last: '/api/v1/vehicles/fec0bf34-eb4e-49e2-b17c-83e21ff5d03a/codes?limit=3&offset=3&sortDirection=desc'
prior: 'https://diagnostic.vin.li/api/v1/vehicles/fc8bdd0c-5be3-46d5-8582-b5b54052eca2/codes?state=inactivelimit=3&until=1437778166267'
}

@@ -262,4 +259,3 @@ }

expect(codes.list[0]).to.be.an.instanceOf(Vinli.Code);
expect(codes).to.have.property('total', 4);
expect(codes).to.have.property('next').that.is.a('function');
expect(codes).to.have.property('prior').that.is.a('function');
m.done();

@@ -278,3 +274,3 @@ });

var m = nock('https://safety.vin.li')
.get('/api/v1/vehicles/c4627b29-14bd-49c3-8e6a-1f857143039f/collisions?offset=0&limit=2')
.get('/api/v1/vehicles/c4627b29-14bd-49c3-8e6a-1f857143039f/collisions?limit=2')
.reply(200, {

@@ -288,3 +284,3 @@ collisions: [{

},
links: { self: 'http://172.17.0.114:3000/api/v1/collisions/06782175-735e-4226-82bc-ebdf887c30f3' }
links: { self: 'https://safety.vin.li/api/v1/collisions/06782175-735e-4226-82bc-ebdf887c30f3' }
}, {

@@ -297,13 +293,13 @@ id: '5b2bf92c-a2c5-4365-9f9b-3d51b8883ad6',

},
links: { self: 'http://172.17.0.114:3000/api/v1/collisions/5b2bf92c-a2c5-4365-9f9b-3d51b8883ad6' }
links: { self: 'https://safety.vin.li/api/v1/collisions/5b2bf92c-a2c5-4365-9f9b-3d51b8883ad6' }
}],
meta: {
pagination: {
total: 3,
remaining: 1,
until: '2015-07-24T22:11:23.829Z',
since: '1970-01-01T00:00:00.000Z',
limit: 2,
offset: 0,
sortDir: 'desc',
links: {
first: 'http://172.17.0.114:3000/api/v1/devices/c4627b29-14bd-49c3-8e6a-1f857143039f/collisions?offset=0&limit=2',
last: 'http://172.17.0.114:3000/api/v1/devices/c4627b29-14bd-49c3-8e6a-1f857143039f/collisions?offset=0&limit=2',
next: 'http://172.17.0.114:3000/api/v1/devices/c4627b29-14bd-49c3-8e6a-1f857143039f/collisions?offset=2&limit=2'
prior: 'https://safety.vin.li/api/v1/vehicles/c4627b29-14bd-49c3-8e6a-1f857143039f/collisions?limit=2&until=1437778166267'
}

@@ -319,4 +315,3 @@ }

expect(collisions.list[0]).to.be.instanceOf(Vinli.Collision);
expect(collisions).to.have.property('total', 3);
expect(collisions).to.have.property('next').that.is.a('function');
expect(collisions).to.have.property('prior').that.is.a('function');

@@ -323,0 +318,0 @@ m.done();

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc