Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #184 from SeanPrashad/issue-159
Browse files Browse the repository at this point in the history
Remove vxml cli commands
  • Loading branch information
AlexLakatos authored Nov 19, 2018
2 parents dd4ae79 + 296c9e1 commit 05d03f9
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 66 deletions.
12 changes: 0 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -518,18 +518,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
Expand Down
26 changes: 0 additions & 26 deletions src/bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,20 +393,6 @@ commander
})
.action(request.linkSms.bind(request));

commander
.command('link:vxml <number> <callback_url>')
.alias('lv')
.description('Link a number to a vxml callback URL')
.option('--voice_status_callback <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 <number> <other_number>')
.alias('lt')
Expand Down Expand Up @@ -461,18 +447,6 @@ commander
})
.action(request.unlinkSms.bind(request));

commander
.command('unlink:vxml <number>')
.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 <number>')
.description('Unlink a number from another number')
Expand Down
8 changes: 0 additions & 8 deletions src/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand All @@ -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) => {
Expand Down
20 changes: 0 additions & 20 deletions tests/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {};
Expand Down

0 comments on commit 05d03f9

Please sign in to comment.