Skip to content

Commit 55b0f72

Browse files
committed
Add monitor/events Node 3.x snippets
1 parent 2990990 commit 55b0f72

File tree

5 files changed

+59
-0
lines changed

5 files changed

+59
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Download the Node helper library from twilio.com/docs/node/install
2+
// These are your accountSid and authToken from https://www.twilio.com/console
3+
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
4+
const authToken = 'your_auth_token';
5+
6+
const client = require('twilio')(accountSid, authToken);
7+
8+
client.monitor.v1
9+
.events('AE21f24380625e4aa4abec76e39b14458d')
10+
.fetch()
11+
.then((data) => console.log(event.description));
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Download the Node helper library from twilio.com/docs/node/install
2+
// These are your accountSid and authToken from https://www.twilio.com/console
3+
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
4+
const authToken = 'your_auth_token';
5+
6+
const client = require('twilio')(accountSid, authToken);
7+
8+
client.monitor.v1.events.list()
9+
.then((response) => console.log(response));
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Download the Node helper library from twilio.com/docs/node/install
2+
// These are your accountSid and authToken from https://www.twilio.com/console
3+
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
4+
const authToken = 'your_auth_token';
5+
6+
const client = require('twilio')(accountSid, authToken);
7+
8+
client.monitor.v1.events
9+
.list({
10+
startDate: "2015-03-01T00:00:00Z",
11+
endDate: "2015-04-01T00:00:00Z"
12+
})
13+
.then((response) => console.log(response));
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Download the Node helper library from twilio.com/docs/node/install
2+
// These are your accountSid and authToken from https://www.twilio.com/console
3+
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
4+
const authToken = 'your_auth_token';
5+
6+
const client = require('twilio')(accountSid, authToken);
7+
8+
client.monitor.v1.events
9+
.list({
10+
resourceSid: "PN4aa51b930717ea83c91971b86d99018f"
11+
})
12+
.then((response) => console.log(response));
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Download the Node helper library from twilio.com/docs/node/install
2+
// These are your accountSid and authToken from https://www.twilio.com/console
3+
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
4+
const authToken = 'your_auth_token';
5+
6+
const client = require('twilio')(accountSid, authToken);
7+
8+
client.monitor.v1.events
9+
.list({
10+
sourceIpAddress: "104.14.155.29",
11+
startDate: "2015-04-25T00:00:00Z",
12+
endDate: "2015-04-25T23:59:59Z"
13+
})
14+
.then((response) => console.log(response));

0 commit comments

Comments
 (0)