Skip to content

Commit 06b657e

Browse files
Revert "CMS update of rest/media/instance-delete-example-1 by mswyers@twilio.com"
This reverts commit c574183.
1 parent c574183 commit 06b657e

File tree

5 files changed

+21
-14
lines changed

5 files changed

+21
-14
lines changed
Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
// Download the Node helper library from twilio.com/docs/node/install
22
// These vars are your accountSid and authToken from twilio.com/user/account
3-
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
4-
var authToken = "your_auth_token";
5-
var client = require('twilio')(accountSid, authToken);
3+
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
4+
const authToken = 'your_auth_token';
5+
const client = require('twilio')(accountSid, authToken);
66

7-
client.messages("MM800f449d0399ed014aae2bcc0cc2f2ec").media("ME557ce644e5ab84fa21cc21112e22c485").delete(function(err, data) {
7+
client
8+
.messages('MM800f449d0399ed014aae2bcc0cc2f2ec')
9+
.media('ME557ce644e5ab84fa21cc21112e22c485')
10+
.delete((err, data) => {
811
if (err) {
9-
console.log(err.status);
10-
throw err.message;
12+
console.log(err.status);
13+
throw err.message;
1114
} else {
12-
console.log("Sid ME557ce644e5ab84fa21cc21112e22c485 deleted successfully.");
15+
console.log(
16+
'Sid ME557ce644e5ab84fa21cc21112e22c485 deleted successfully.'
17+
);
1318
}
14-
});
19+
});

rest/media/instance-delete-example-1/instance-delete-example-1.3.x.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ const client = require('twilio')(accountSid, authToken);
77

88
const mediaSid = 'ME557ce644e5ab84fa21cc21112e22c485';
99

10-
client.messages('MM800f449d0399ed014aae2bcc0cc2f2ec').media(mediaSid)
10+
client
11+
.messages('MM800f449d0399ed014aae2bcc0cc2f2ec')
12+
.media(mediaSid)
1113
.remove()
1214
.then(() => {
1315
console.log(`Sid ${mediaSid} deleted successfully.`);
1416
})
15-
.catch((err) => console.log(err));
17+
.catch(err => console.log(err));
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
$ curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/MM800f449d0399ed014aae2bcc0cc2f2ec/Media/ME557ce644e5ab84fa21cc21112e22c485.json \
1+
curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/MM800f449d0399ed014aae2bcc0cc2f2ec/Media/ME557ce644e5ab84fa21cc21112e22c485.json \
22
-u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
$ curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/MM800f449d0399ed014aae2bcc0cc2f2ec/Media/ME557ce644e5ab84fa21cc21112e22c485 \
1+
curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/MM800f449d0399ed014aae2bcc0cc2f2ec/Media/ME557ce644e5ab84fa21cc21112e22c485 \
22
-u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"type": "server",
3-
"title": "Delete a Media Resource"
2+
"title": "Delete a Media",
3+
"type": "server"
44
}

0 commit comments

Comments
 (0)