From 296c9e134b134d8a770e153f03cbb937b0f1871c Mon Sep 17 00:00:00 2001 From: Sean Prashad Date: Wed, 24 Oct 2018 15:56:42 -0400 Subject: [PATCH] Remove vxml cli commands With the shutdown of the call API, the link:vxml and unlink:vxml commands can be removed as they are no longer used. Note that this information might be referenced in other areas, ie. the verbose numbers list screen, but this is OK as users may want to see that a number is still linked to vxml in order to identify changes. --- README.md | 12 ------------ src/bin.js | 26 -------------------------- src/request.js | 8 -------- tests/request.js | 20 -------------------- 4 files changed, 66 deletions(-) diff --git a/README.md b/README.md index 7148ad6..dbcf0c8 100644 --- a/README.md +++ b/README.md @@ -512,18 +512,6 @@ Number updated Alias: `nexmo lsms` -#### Link a number to a Voice XML callback URL - -```bash -> nexmo link:vxml 12057200555 http://example.com/callback -Number updated - -> nexmo unlink:vxml 12057200555 -Number updated -``` - -Alias: `nexmo lv` - #### Link a number to SIP URI ```bash diff --git a/src/bin.js b/src/bin.js index 85b7986..893d2a4 100644 --- a/src/bin.js +++ b/src/bin.js @@ -393,20 +393,6 @@ commander }) .action(request.linkSms.bind(request)); -commander - .command('link:vxml ') - .alias('lv') - .description('Link a number to a vxml callback URL') - .option('--voice_status_callback ', 'a URL to which Nexmo will send a request when the call ends to notify your application.') - .option('-c, --country_code [country_code]', 'manually provide the country code, overriding a dynamic lookup') - .on('--help', () => { - emitter.log(' Examples:'); - emitter.log(' '); - emitter.log(' $ nexmo link:vxml 445555555555 http://example.com/callback'); - emitter.log(' '); - }) - .action(request.linkVxml.bind(request)); - commander .command('link:tel ') .alias('lt') @@ -461,18 +447,6 @@ commander }) .action(request.unlinkSms.bind(request)); -commander - .command('unlink:vxml ') - .description('Unlink a number from a vxml callback URL') - .option('-c, --country_code [country_code]', 'manually provide the country code, overriding a dynamic lookup') - .on('--help', () => { - emitter.log(' Examples:'); - emitter.log(' '); - emitter.log(' $ nexmo unlink:vxml 445555555555'); - emitter.log(' '); - }) - .action(request.unlinkVxml.bind(request)); - commander .command('unlink:tel ') .description('Unlink a number from another number') diff --git a/src/request.js b/src/request.js index 8915355..c8784b4 100644 --- a/src/request.js +++ b/src/request.js @@ -180,10 +180,6 @@ class Request { this._link(number, flags, null, 'sip', sip_uri, flags.voice_status_callback); } - linkVxml(number, calback_url, flags) { - this._link(number, flags, null, 'vxml', calback_url, flags.voice_status_callback); - } - unlinkApp(number, flags) { this._link(number, flags, null, 'app'); } @@ -200,10 +196,6 @@ class Request { this._link(number, flags, null, 'sip'); } - unlinkVxml(number, flags) { - this._link(number, flags, null, 'vxml'); - } - numberUpdate(number, flags) { number = stripPlus(number); this.getCountryCode(number, flags, (country_code) => { diff --git a/tests/request.js b/tests/request.js index 6bce8e0..4dc5cdd 100644 --- a/tests/request.js +++ b/tests/request.js @@ -533,26 +533,6 @@ describe('Request', () => { expect(nexmo.numberInsight.get).to.have.been.calledWithMatch({level:'basic'}); })); - describe('.linkVxml', () => { - it('should call nexmo.numberInsight.get', test(function() { - nexmo = {}; - nexmo.numberInsight = sinon.createStubInstance(NumberInsight); - client.instance.returns(nexmo); - request.linkVxml('123', 'abc', {}); - expect(nexmo.numberInsight.get).to.have.been.calledWithMatch({level:'basic'}); - })); - }); - - describe('.unlinkVxml', () => { - it('should call nexmo.numberInsight.get', test(function() { - nexmo = {}; - nexmo.numberInsight = sinon.createStubInstance(NumberInsight); - client.instance.returns(nexmo); - request.unlinkVxml('123'); - expect(nexmo.numberInsight.get).to.have.been.calledWithMatch({level:'basic'}); - })); - }); - describe('.linkSip', () => { it('should call nexmo.numberInsight.get', test(function() { nexmo = {};