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

vinli

Package Overview
Dependencies
Maintainers
1
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 0.2.0 to 0.2.1

lib/event.js

30

lib/subscription.js
var Utils = require('./utils');
var extend = require('extend');
var Hoek = require('hoek');
var Joi = require('joi');
var Event = require('./event');

@@ -22,2 +25,29 @@ var Subscription = function(_obj) {

Subscription.prototype.notifications = function(_options) {
var self = this;
_options = Hoek.applyToDefaults({ offset: 0, limit: 20 }, _options || {});
Joi.assert(_options, Utils.paginationOptions);
return Utils.request.get(
'events',
'devices/' + this.deviceId + '/subscriptions/' + this.id + '/notifications',
_options).then(function(resp) {
return Utils.listResponse(resp, 'notifications', self.notifications, self);
});
};
Subscription.prototype.events = function(_options) {
var self = this;
_options = Hoek.applyToDefaults({ offset: 0, limit: 20 }, _options || {});
Joi.assert(_options, Utils.paginationOptions);
return Utils.request.get(
'events',
'devices/' + this.deviceId + '/subscriptions/' + this.id + '/events',
_options).then(function(resp) {
resp.events = resp.events.map(function(v) { return new Event(v); });
return Utils.listResponse(resp, 'events', self.events, self);
});
};
module.exports = Subscription;

2

package.json
{
"name": "vinli",
"version": "0.2.0",
"version": "0.2.1",
"description": "Official Node.js SDK for interacting with the Vinli Platform",

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

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