elemental-live-client
Advanced tools
Comparing version 0.3.1 to 0.3.2
@@ -24,3 +24,3 @@ { | ||
"callback-return": "off", | ||
"camelcase": "error", | ||
"camelcase": "off", | ||
"class-methods-use-this": "error", | ||
@@ -27,0 +27,0 @@ "comma-dangle": ["error", "only-multiline"], |
const resource = require('./resource'); | ||
const headers = {'Accept': 'application/json'}; | ||
@@ -15,4 +16,2 @@ class LiveEvent extends resource.Resource { | ||
eventStatus(eventId) { | ||
const headers = {'Accept': 'application/json'}; | ||
return this.elementalClient.sendRequest('GET', `/api/live_events/${eventId}/status`, null, null, headers); | ||
@@ -48,4 +47,8 @@ } | ||
} | ||
activateInput(eventId, input_id) { | ||
return this.elementalClient.sendRequest('POST', `/api/live_events/${eventId}/activate_input`, null, {input_id}); | ||
} | ||
} | ||
module.exports = {LiveEvent}; |
{ | ||
"name": "elemental-live-client", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "JS library to communicate with Elemental live API", | ||
@@ -5,0 +5,0 @@ "directories": { |
@@ -127,2 +127,10 @@ import {LiveEvent} from '../lib/live-event'; | ||
}); | ||
it('activateInput should send request to activate an input with proper parameters', () => { | ||
const testData = getInstance(); | ||
const result = testData.instance.activateInput(195, 465); | ||
assert.equal(result, testData.retval); | ||
assert(testData.sendRequest.calledWith('POST', '/api/live_events/195/activate_input', null, {'input_id': 465})); | ||
}); | ||
}); |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
126793
927
1