Comparing version 0.3.1 to 0.3.2
@@ -38,11 +38,2 @@ //Get required modules | ||
} | ||
} else { | ||
if (params && !Object.keys(params).length && method == 'POST') { | ||
var parts = action.split('/'); | ||
var doc_path = 'https://www.plivo.com/docs/api'; | ||
for (var i=0; i<parts.length; i=i+2) { | ||
doc_path += '/' + parts[i].toLowerCase(); | ||
} | ||
throw new PlivoError('This API has required parameters. Please refer to the following link for more information:\n' + doc_path + '\n'); | ||
} | ||
} | ||
@@ -85,2 +76,3 @@ | ||
callback(response.statusCode, body); | ||
}); | ||
@@ -334,3 +326,3 @@ } else if (method == 'GET') { | ||
plivo.stop_play_conference_member = function (params, callback) { | ||
var action = 'Conference/' + params['conference_id'] + '/Member/' + params['member_id'] + '/Play'; | ||
var action = 'Conference/' + params['conference_id'] + '/Member/' + params['member_id'] + '/Play/'; | ||
delete params.conference_id; | ||
@@ -954,3 +946,3 @@ delete params.member_id; | ||
'dialMusic', 'confirmKey', 'redirect', 'callbackUrl', | ||
'callbackMethod', 'digitsMatch', 'sipHeaders']; | ||
'callbackMethod', 'digitsMatch', 'digitsMatchBLeg', 'sipHeaders']; | ||
this.nestables = ['Number', 'User']; | ||
@@ -957,0 +949,0 @@ } |
{ | ||
"name": "plivo", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Plivo NodeJS helper library.", | ||
@@ -5,0 +5,0 @@ "main": "lib/plivo.js", |
@@ -81,10 +81,2 @@ var assert = require('assert'); | ||
it('should throw error when API params are not provided for POST requests.', function() { | ||
assert.throws( | ||
function () { | ||
rest.make_call({}, function(status, response) { console.log(status); }); | ||
} | ||
); | ||
}); | ||
it('should continue when callback is not provided.', function() { | ||
@@ -91,0 +83,0 @@ assert.doesNotThrow( |
58674
11
1073