Skip to content

Commit cdd2466

Browse files
committed
Update gather.play js examples to use correct arguments
1 parent e25db01 commit cdd2466

File tree

6 files changed

+6
-7
lines changed

6 files changed

+6
-7
lines changed

guides/voice/respond-incoming-calls-guide/respond-add-ons/example.3.x.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ app.post('/voice', (request, response) => {
2727
twiml.say({voice: 'alice'},
2828
`Never gonna give you up ${firstName}.`
2929
);
30-
twiml.play('https://demo.twilio.com/docs/classic.mp3');
30+
twiml.play({}, 'https://demo.twilio.com/docs/classic.mp3');
3131

3232
// Render the response as XML in reply to the webhook request
3333
response.type('text/xml');

guides/voice/respond-incoming-calls-guide/respond-with-parameters/example.3.x.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ app.post('/voice', (request, response) => {
2020
twiml.say({voice: 'alice'},
2121
`Never gonna give you up ${city}.`
2222
);
23-
twiml.play('https://demo.twilio.com/docs/classic.mp3');
23+
twiml.play({}, 'https://demo.twilio.com/docs/classic.mp3');
2424

2525
// Render the response as XML in reply to the webhook request
2626
response.type('text/xml');

rest/voice/generate-twiml-gather/twiml-gather.3.x.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ router.post('/voice', twilio.webhook({validate: false}), (req, res) => {
1313
numDigits: '1',
1414
method: 'POST',
1515
});
16-
gather.play('http://howtodocs.s3.amazonaws.com/et-phone.mp3', {loop: 3});
1716

1817
res.send(twiml);
1918
});

rest/voice/generate-twiml-play/example-1.3.x.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ http.createServer((req, res) => {
66
const twiml = new VoiceResponse();
77

88
twiml.say('Hello. It\'s me.');
9-
twiml.play('http://howtodocs.s3.amazonaws.com/ahoyhoy.mp3');
9+
twiml.play{}, 'http://howtodocs.s3.amazonaws.com/ahoyhoy.mp3');
1010

1111
res.writeHead(200, {'Content-Type': 'text/xml'});
1212

rest/voice/generate-twiml-record/twiml-record.3.x.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ router.post('/voice', twilio.webhook({validate: false}), (req, res) => {
1717
numDigits: '1',
1818
method: 'POST',
1919
});
20-
gather.play('http://howtodocs.s3.amazonaws.com/et-phone.mp3', {loop: 3});
20+
gather.play({}, 'http://howtodocs.s3.amazonaws.com/et-phone.mp3', {loop: 3});
2121

2222
res.send(twiml);
2323
});
@@ -53,7 +53,7 @@ router.post('/handle-record', twilio.webhook({validate: false}), (req, res) => {
5353
const twiml = new VoiceResponse();
5454

5555
twiml.say('Listen to your recorded message.');
56-
twiml.play(req.body.RecordingUrl);
56+
twiml.play({}, req.body.RecordingUrl);
5757
twiml.say('Goodbye.');
5858

5959
res.send(twiml);

rest/voice/twiml-recording-action/recording-action.3.x.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ router.post('/handle-record', twilio.webhook({validate: false}), (req, res) =>{
1313
const twiml = new VoiceResponse();
1414

1515
twiml.say('Listen to your recorded message.');
16-
twiml.play(req.body.RecordingUrl);
16+
twiml.play({}, req.body.RecordingUrl);
1717
twiml.say('Goodbye.');
1818

1919
res.end(twiml.toString());

0 commit comments

Comments
 (0)