diff --git a/lib/application.js b/lib/application.js index e922aa5..0ae50ce 100644 --- a/lib/application.js +++ b/lib/application.js @@ -100,7 +100,7 @@ Application.prototype.getSipPeers = function(query, callback){ callback = query; query = {}; } - this.client.makeRequest("get", this.client.concatAccountPath(APPLICATION_PATH) + "/" + this.applicationId + "/associatedsippeers", function(err,res){ + this.client.makeRequest("get", this.client.concatAccountPath(APPLICATION_PATH) + "/" + this.applicationId + "/associatedsippeers", query, function(err,res){ if(err){ return callback(err); } diff --git a/lib/site.js b/lib/site.js index 1edc0dc..7aeb26d 100644 --- a/lib/site.js +++ b/lib/site.js @@ -146,7 +146,7 @@ Site.prototype.getInserviceNumbers = function(query, callback){ callback = query; query = {}; } - this.client.makeRequest("get", this.client.concatAccountPath(SITE_PATH) + "/" + this.id + "/inserviceNumbers", function(err,res){ + this.client.makeRequest("get", this.client.concatAccountPath(SITE_PATH) + "/" + this.id + "/inserviceNumbers", query, function(err,res){ if(err){ return callback(err); } @@ -173,7 +173,7 @@ Site.prototype.getPortIns = function(query, callback){ callback = query; query = {}; } - this.client.makeRequest("get", this.client.concatAccountPath(SITE_PATH) + "/" + this.id + "/portins", function(err,res){ + this.client.makeRequest("get", this.client.concatAccountPath(SITE_PATH) + "/" + this.id + "/portins", query, function(err,res){ if(err){ return callback(err); } @@ -187,7 +187,7 @@ Site.prototype.getTotalTns = function(query, callback){ callback = query; query = {}; } - this.client.makeRequest("get", this.client.concatAccountPath(SITE_PATH) + "/" + this.id + "/totaltns", function(err,res){ + this.client.makeRequest("get", this.client.concatAccountPath(SITE_PATH) + "/" + this.id + "/totaltns", query, function(err,res){ if(err){ return callback(err); } diff --git a/test/site.js b/test/site.js index bfa029d..7ce31db 100644 --- a/test/site.js +++ b/test/site.js @@ -258,11 +258,11 @@ describe("Site", function(){ }); describe("#getInserviceNumbers", function(done){ it("should get a list of inservice numbers", function(done){ - helper.nock().get("/accounts/FakeAccountId/sites/1/inserviceNumbers").reply(200, helper.xml.inServiceNumbers, {"Content-Type": "application/xml"}); + helper.nock().get("/accounts/FakeAccountId/sites/1/inserviceNumbers?page=1&size=100").reply(200, helper.xml.inServiceNumbers, {"Content-Type": "application/xml"}); var site = new Site(); site.id = "1"; site.client = helper.createClient(); - site.getInserviceNumbers({}, function(err,res){ + site.getInserviceNumbers({page: 1, size: 100}, function(err,res){ if(err){ return done(err); }