Skip to content

Commit c574183

Browse files
CMS update of rest/media/instance-delete-example-1 by mswyers@twilio.com
1 parent 42f4d03 commit c574183

File tree

5 files changed

+14
-21
lines changed

5 files changed

+14
-21
lines changed
Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
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-
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
4-
const authToken = 'your_auth_token';
5-
const client = require('twilio')(accountSid, authToken);
3+
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
4+
var authToken = "your_auth_token";
5+
var client = require('twilio')(accountSid, authToken);
66

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

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

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

88
const mediaSid = 'ME557ce644e5ab84fa21cc21112e22c485';
99

10-
client
11-
.messages('MM800f449d0399ed014aae2bcc0cc2f2ec')
12-
.media(mediaSid)
10+
client.messages('MM800f449d0399ed014aae2bcc0cc2f2ec').media(mediaSid)
1311
.remove()
1412
.then(() => {
1513
console.log(`Sid ${mediaSid} deleted successfully.`);
1614
})
17-
.catch(err => console.log(err));
15+
.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-
"title": "Delete a Media",
3-
"type": "server"
2+
"type": "server",
3+
"title": "Delete a Media Resource"
44
}

0 commit comments

Comments
 (0)