mirror of
https://github.com/donl/plivo-node.git
synced 2026-05-25 22:07:10 -06:00
* Added phlo client. * Finished implementaiton of initializing phlo client. * Finished logic for v2 methods of multiparty call(not members). * Added test cases for multiparty call. * Finished logic for phlo get api. * Added member method structure. * Finished implementation of phlo.run(). * Finished api calls for multi party(except abort transfer). * Deleted old rest.js file. * Finished abortTranfer implementation with test cases. * Finished implementation of member.resumeCall(). * Finished all member functions. * Reverted debugging logic. * Removed console.log * Added samples for all apis. method structure change for abort transfer. * Resolved nsp issue. * Audit fix. * Package Lock Fix. * Added test proxy for test cases. * Resolved issue in request.js json format. * Improved comments. * Added test cases for .get() methods. * Removed async await to support older browsers. * Modified examples of phlo, removed async await. * Resolved example issues, remove auth credentials. * Removed es6 declaration syntaxes from phlo example. * Added logic to pass payload. * changed beta version 4.1-beta.1 * changed beta version 4.1-beta.1 * changed beta version 4.1-beta.1 * changes in changelog & readme- Add PHLO support
91 lines
3.2 KiB
JavaScript
91 lines
3.2 KiB
JavaScript
'use strict';
|
|
|
|
import {
|
|
PhloClient
|
|
} from '../lib/rest/client-test';
|
|
// } from '../lib/rest/client';
|
|
|
|
describe('Phlo Member Interface', function () {
|
|
|
|
let authId = 'auth-id';
|
|
let authToken = 'auth-token';
|
|
let phloId = 'sample-phlo-id';
|
|
let nodeId = 'sample-mpc-id';
|
|
|
|
let memberAddress = '919920700964';
|
|
|
|
/******************** Phlo resource test cases *********************/
|
|
|
|
it('resumeCall - Phlo Member', function () {
|
|
let phloClient = new PhloClient(authId, authToken);
|
|
phloClient.phlo(phloId).multiPartyCall(nodeId).member(memberAddress).resumeCall().then(function (result) {
|
|
// console.log('result', result);
|
|
});
|
|
});
|
|
|
|
it('voicemail drop - Phlo Member', function () {
|
|
let phloClient = new PhloClient(authId, authToken);
|
|
phloClient.phlo(phloId).multiPartyCall(nodeId).member(memberAddress).voicemailDrop().then(function (result) {
|
|
// console.log('result', result);
|
|
});
|
|
});
|
|
|
|
it('hangup - Phlo Member', function () {
|
|
let phloClient = new PhloClient(authId, authToken);
|
|
phloClient.phlo(phloId).multiPartyCall(nodeId).member(memberAddress).hangup().then(function (result) {
|
|
// console.log('result', result);
|
|
});
|
|
});
|
|
|
|
it('hold - Phlo Member', function () {
|
|
let phloClient = new PhloClient(authId, authToken);
|
|
phloClient.phlo(phloId).multiPartyCall(nodeId).member(memberAddress).hold().then(function (result) {
|
|
// console.log('result', result);
|
|
});
|
|
});
|
|
|
|
it('unhold - Phlo Member', function () {
|
|
let phloClient = new PhloClient(authId, authToken);
|
|
phloClient.phlo(phloId).multiPartyCall(nodeId).member(memberAddress).unhold().then(function (result) {
|
|
// console.log('result', result);
|
|
});
|
|
});
|
|
|
|
/******************** Phlo resource test cases using member.get *********************/
|
|
|
|
it('resumeCall using member.get() - Phlo Member', function () {
|
|
let phloClient = new PhloClient(authId, authToken);
|
|
phloClient.phlo(phloId).multiPartyCall(nodeId).member.get(memberAddress).resumeCall().then(function (result) {
|
|
// console.log('result', result);
|
|
});
|
|
});
|
|
|
|
it('voicemail drop using member.get() - Phlo Member', function () {
|
|
let phloClient = new PhloClient(authId, authToken);
|
|
phloClient.phlo(phloId).multiPartyCall(nodeId).member.get(memberAddress).voicemailDrop().then(function (result) {
|
|
// console.log('result', result);
|
|
})
|
|
});
|
|
|
|
it('hangup using member.get() - Phlo Member', function () {
|
|
let phloClient = new PhloClient(authId, authToken);
|
|
phloClient.phlo(phloId).multiPartyCall(nodeId).member.get(memberAddress).hangup().then(function (result) {
|
|
// console.log('result', result);
|
|
});
|
|
});
|
|
|
|
it('hold using member.get() - Phlo Member', function () {
|
|
let phloClient = new PhloClient(authId, authToken);
|
|
phloClient.phlo(phloId).multiPartyCall(nodeId).member.get(memberAddress).hold().then(function (result) {
|
|
// console.log('result', result);
|
|
});
|
|
});
|
|
|
|
it('unhold using member.get() - Phlo Member', function () {
|
|
let phloClient = new PhloClient(authId, authToken);
|
|
phloClient.phlo(phloId).multiPartyCall(nodeId).member.get(memberAddress).unhold().then(function (result) {
|
|
// console.log('result', result);
|
|
});
|
|
});
|
|
|
|
});
|