Skip to content

Commit

Permalink
adding type and address optional arguments to TropoProvision.viewAddr…
Browse files Browse the repository at this point in the history
…esses
  • Loading branch information
jharlap committed Feb 16, 2012
1 parent acceb9a commit 87aa167
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/tropo-provisioning.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -50,8 +50,13 @@ TropoProvision.prototype.viewSpecificApplication = function(applicationID) {
return this.makeApiCall('GET', provisioningUrlHost, path, null); return this.makeApiCall('GET', provisioningUrlHost, path, null);
}; };


TropoProvision.prototype.viewAddresses = function(applicationID) { TropoProvision.prototype.viewAddresses = function(applicationID, type, address) {
var path = provisioningUrlPath + 'applications/' + applicationID + '/addresses'; var path = provisioningUrlPath + 'applications/' + applicationID + '/addresses';
var validTypes = ['number', 'sip', 'aim', 'skype'];
if ((type != null) && validTypes.indexOf(type) >= 0) {
path += '/' + type;
if(address != null) path += '/' + address;
}
return this.makeApiCall('GET', provisioningUrlHost, path, null); return this.makeApiCall('GET', provisioningUrlHost, path, null);
}; };


Expand Down

0 comments on commit 87aa167

Please sign in to comment.