Skip to content

Commit 4b75da8

Browse files
committed
list, edit, and delete apps from peer functionality
1 parent 308e2c8 commit 4b75da8

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

lib/sipPeer.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,21 @@ SipPeer.prototype.moveTns = function(numbers, callback){
7878
this.client.makeRequest("post", url, {sipPeerTelephoneNumbers: {fullNumber: numbers}}, callback);
7979
};
8080

81+
SipPeer.prototype.getApplications = function(callback) {
82+
var url = var url = this.client.concatAccountPath(SITE_PATH + "/" + this.siteId + "/" + SIP_PEER_PATH + "/" + this.id + "/" + "products" + "/" + "messaging" + "/" + "applicationSettings");
83+
this.client.makeRequest("get", url, callback)
84+
}
85+
86+
SipPeer.prototype.editApplications = function(appData, callback) {
87+
var url = var url = this.client.concatAccountPath(SITE_PATH + "/" + this.siteId + "/" + SIP_PEER_PATH + "/" + this.id + "/" + "products" + "/" + "messaging" + "/" + "applicationSettings");
88+
const data = {applicationSettings: appData}
89+
this.client.makeRequest("put", url, data, callback);
90+
}
91+
92+
SipPeer.prototype.removeApplications = function(callback) {
93+
var url = var url = this.client.concatAccountPath(SITE_PATH + "/" + this.siteId + "/" + SIP_PEER_PATH + "/" + this.id + "/" + "products" + "/" + "messaging" + "/" + "applicationSettings");
94+
const data = {applicationSettings: 'REMOVE'}
95+
this.client.makeRequest("put", url, data, callback);
96+
}
8197

8298
module.exports = SipPeer;

0 commit comments

Comments
 (0)