elemental-live-client
Advanced tools
Comparing version 0.2.2 to 0.2.3
@@ -5,2 +5,3 @@ const dateFormat = require('dateformat'); | ||
const Device = require('./device').Device; | ||
const LiveEvent = require('./live-event').LiveEvent; | ||
@@ -21,3 +22,2 @@ const Resource = require('./resource').Resource; | ||
'presetCategories': 'preset_categories', | ||
'devices': 'devices', | ||
}; | ||
@@ -78,2 +78,6 @@ | ||
devices() { | ||
return new Device(this); | ||
} | ||
static formatDate(date) { | ||
@@ -80,0 +84,0 @@ return dateFormat(date, 'yyyy-mm-dd HH:MM:ss o', true); |
{ | ||
"name": "elemental-live-client", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "JS library to communicate with Elemental live API", | ||
@@ -5,0 +5,0 @@ "directories": { |
const assert = require('chai').assert; | ||
const xmlEventList = require('./data-test'); | ||
const Device = require('../lib/device').Device; | ||
const ElementalClient = require('../lib/main').ElementalClient; | ||
@@ -134,7 +135,8 @@ const LiveEvent = require('../lib/live-event').LiveEvent; | ||
it('devices should return a devices Resource', () => { | ||
it('devices should return an instance of Devices', () => { | ||
const client = new ElementalClient('http://my-elemental-server'); | ||
const devices = client.devices(); | ||
assert.deepEqual(devices, new Resource(client, 'devices')); | ||
assert(devices instanceof Device); | ||
assert.equal(devices.elementalClient, client); | ||
}); | ||
@@ -141,0 +143,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
125506
20
902