Skip to content

Commit 2757ff5

Browse files
dkundelwell1791
authored andcommitted
Add fixes performed by prettier
1 parent a866ba5 commit 2757ff5

File tree

913 files changed

+5650
-4331
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

913 files changed

+5650
-4331
lines changed

add-ons/lookups/payfone-tcpa-compliance/payfone-tcpa-compliance.3.x.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ client.lookups.v1
1010
.fetch({
1111
addOns: 'payfone_tcpa_compliance',
1212
addOnsData: {
13-
'payfone_tcpa_compliance.RightPartyContactedDate': '20160101'
14-
}
13+
'payfone_tcpa_compliance.RightPartyContactedDate': '20160101',
14+
},
1515
})
1616
.then(number => console.log(number.addOns));

client/accept-call/accept-call.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Twilio.Device.incoming(function (conn) {
1+
Twilio.Device.incoming(function(conn) {
22
console.log('Incoming connection from ' + conn.parameters.From);
33
// accept the incoming connection and start two-way audio
44
conn.accept();
5-
});
5+
});

client/capability-token-2way/capability-token.2.x.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
var http = require('http'),
2-
express = require('express'),
3-
bodyParser = require('body-parser'),
4-
twilio = require('twilio');
2+
express = require('express'),
3+
bodyParser = require('body-parser'),
4+
twilio = require('twilio');
55

66
var app = express();
77
app.use(bodyParser.urlencoded({ extended: false }));
@@ -19,13 +19,13 @@ app.get('/token', function(req, res) {
1919
capability.allowClientIncoming(req.body.ClientName);
2020
var token = capability.generate();
2121

22-
res.set('Content-Type', 'application/jwt')
22+
res.set('Content-Type', 'application/jwt');
2323
res.send(token);
2424
});
2525

26-
app.post('/voice', function (req, res) {
27-
// TODO: Create TwiML response
26+
app.post('/voice', function(req, res) {
27+
// TODO: Create TwiML response
2828
});
2929

3030
http.createServer(app).listen(1337, '127.0.0.1');
31-
console.log('Twilio Client app server running at http://127.0.0.1:1337/');
31+
console.log('Twilio Client app server running at http://127.0.0.1:1337/');

client/capability-token-2way/capability-token.3.x.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const bodyParser = require('body-parser');
44
const ClientCapability = require('twilio').jwt.ClientCapability;
55

66
const app = express();
7-
app.use(bodyParser.urlencoded({extended: false}));
7+
app.use(bodyParser.urlencoded({ extended: false }));
88

99
app.get('/token', (req, res) => {
1010
// put your Twilio API credentials here
@@ -16,10 +16,10 @@ app.get('/token', (req, res) => {
1616

1717
const capability = new ClientCapability({
1818
accountSid: accountSid,
19-
authToken: authToken
19+
authToken: authToken,
2020
});
2121
capability.addScope(
22-
new ClientCapability.OutgoingClientScope({applicationSid: appSid})
22+
new ClientCapability.OutgoingClientScope({ applicationSid: appSid })
2323
);
2424
capability.addScope(
2525
new ClientCapability.IncomingClientScope(req.body.ClientName)
@@ -31,7 +31,7 @@ app.get('/token', (req, res) => {
3131
});
3232

3333
app.post('/voice', (req, res) => {
34-
// TODO: Create TwiML response
34+
// TODO: Create TwiML response
3535
});
3636

3737
http.createServer(app).listen(1337, '127.0.0.1');
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
var token = capability.generate(600);
1+
var token = capability.generate(600);
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var http = require('http'),
2-
express = require('express'),
3-
twilio = require('twilio');
2+
express = require('express'),
3+
twilio = require('twilio');
44

55
var app = express();
66

@@ -13,13 +13,13 @@ app.get('/token', function(req, res) {
1313
capability.allowClientIncoming('jenny');
1414
var token = capability.generate();
1515

16-
res.set('Content-Type', 'application/jwt')
16+
res.set('Content-Type', 'application/jwt');
1717
res.send(token);
1818
});
1919

20-
app.post('/voice', function (req, res) {
21-
// TODO: Create TwiML response
20+
app.post('/voice', function(req, res) {
21+
// TODO: Create TwiML response
2222
});
2323

2424
http.createServer(app).listen(1337, '127.0.0.1');
25-
console.log('Twilio Client app server running at http://127.0.0.1:1337/');
25+
console.log('Twilio Client app server running at http://127.0.0.1:1337/');

client/capability-token-incoming/capability-token.3.x.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@ app.get('/token', (req, res) => {
1111

1212
const capability = new ClientCapability({
1313
accountSid: accountSid,
14-
authToken: authToken
14+
authToken: authToken,
1515
});
16-
capability.addScope(
17-
new ClientCapability.IncomingClientScope('jenny')
18-
);
16+
capability.addScope(new ClientCapability.IncomingClientScope('jenny'));
1917
const token = capability.toJwt();
2018

2119
res.set('Content-Type', 'application/jwt');

client/capability-token-outgoing/capability-token.2.x.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var http = require('http'),
2-
express = require('express'),
3-
twilio = require('twilio');
2+
express = require('express'),
3+
twilio = require('twilio');
44

55
var app = express();
66

@@ -16,13 +16,13 @@ app.get('/token', function(req, res) {
1616
capability.allowClientOutgoing(appSid);
1717
var token = capability.generate();
1818

19-
res.set('Content-Type', 'application/jwt')
19+
res.set('Content-Type', 'application/jwt');
2020
res.send(token);
2121
});
2222

23-
app.post('/voice', function (req, res) {
24-
// TODO: Create TwiML response
23+
app.post('/voice', function(req, res) {
24+
// TODO: Create TwiML response
2525
});
2626

2727
http.createServer(app).listen(1337, '127.0.0.1');
28-
console.log('Twilio Client app server running at http://127.0.0.1:1337/');
28+
console.log('Twilio Client app server running at http://127.0.0.1:1337/');

client/capability-token-outgoing/capability-token.3.x.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ app.get('/token', (req, res) => {
1414

1515
const capability = new ClientCapability({
1616
accountSid: accountSid,
17-
authToken: authToken
17+
authToken: authToken,
1818
});
1919
capability.addScope(
20-
new ClientCapability.OutgoingClientScope({applicationSid: appSid})
20+
new ClientCapability.OutgoingClientScope({ applicationSid: appSid })
2121
);
2222
const token = capability.toJwt();
2323

client/capability-token/capability-token.2.x.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var http = require('http'),
2-
express = require('express'),
3-
twilio = require('twilio');
2+
express = require('express'),
3+
twilio = require('twilio');
44

55
var app = express();
66

@@ -17,13 +17,13 @@ app.get('/token', function(req, res) {
1717
capability.allowClientIncoming('jenny');
1818
var token = capability.generate();
1919

20-
res.set('Content-Type', 'application/jwt')
20+
res.set('Content-Type', 'application/jwt');
2121
res.send(token);
2222
});
2323

24-
app.post('/voice', function (req, res) {
25-
// TODO: Create TwiML response
24+
app.post('/voice', function(req, res) {
25+
// TODO: Create TwiML response
2626
});
2727

2828
http.createServer(app).listen(1337, '127.0.0.1');
29-
console.log('Twilio Client app server running at http://127.0.0.1:1337/');
29+
console.log('Twilio Client app server running at http://127.0.0.1:1337/');

client/capability-token/capability-token.3.x.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,12 @@ app.get('/token', (req, res) => {
1414

1515
const capability = new ClientCapability({
1616
accountSid: accountSid,
17-
authToken: authToken
17+
authToken: authToken,
1818
});
1919
capability.addScope(
20-
new ClientCapability.OutgoingClientScope({applicationSid: appSid})
21-
);
22-
capability.addScope(
23-
new ClientCapability.IncomingClientScope('jenny')
20+
new ClientCapability.OutgoingClientScope({ applicationSid: appSid })
2421
);
22+
capability.addScope(new ClientCapability.IncomingClientScope('jenny'));
2523
const token = capability.toJwt();
2624

2725
res.set('Content-Type', 'application/jwt');
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Connect a call when button clicked
2-
document.getElementById('button-call').onclick = function () {
2+
document.getElementById('button-call').onclick = function() {
33
console.log('Calling...');
44
Twilio.Device.connect();
5-
};
5+
};
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Connect a call when button clicked
2-
document.getElementById('button-call').onclick = function () {
2+
document.getElementById('button-call').onclick = function() {
33
// get the phone number to connect the call to
44
var params = { To: '15558675309' };
55

66
console.log('Calling ' + params.To + '...');
77
Twilio.Device.connect(params);
8-
};
8+
};
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Connect a call when button clicked
2-
document.getElementById('button-call').onclick = function () {
2+
document.getElementById('button-call').onclick = function() {
33
// get the phone number to connect the call to
44
var params = { To: 'jenny' };
55

66
console.log('Calling ' + params.To + '...');
77
Twilio.Device.connect(params);
8-
};
8+
};

client/create-device/create-device.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
Twilio.Device.setup(token);
22

3-
Twilio.Device.ready(function (device) {
4-
console.log("Ready");
3+
Twilio.Device.ready(function(device) {
4+
console.log('Ready');
55
});
66

7-
Twilio.Device.error(function (error) {
8-
console.log("Error: " + error.message);
7+
Twilio.Device.error(function(error) {
8+
console.log('Error: ' + error.message);
99
});

client/hangup-call/hangup-call.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Connect a call when button clicked
2-
document.getElementById('button-hangup').onclick = function () {
2+
document.getElementById('button-hangup').onclick = function() {
33
console.log('Hanging up...');
44
Twilio.Device.disconnectAll();
5-
};
5+
};

client/reject-call/reject-call.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
Twilio.Device.incoming(function (conn) {
1+
Twilio.Device.incoming(function(conn) {
22
console.log('Incoming connection from ' + conn.parameters.From);
33
var archEnemyPhoneNumber = '+15417280966';
4-
4+
55
if (conn.parameters.From === archEnemyPhoneNumber) {
66
conn.reject();
77
} else {
88
// accept the incoming connection and start two-way audio
99
conn.accept();
1010
}
11-
});
11+
});

client/request-token/request-token.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
$(function() {
2-
32
$.ajax('/token')
4-
.done(function (token) {
3+
.done(function(token) {
54
console.log('Got a token: ', token);
6-
// TODO: Use token with Twilio Client
5+
// TODO: Use token with Twilio Client
76
})
8-
.fail(function () {
7+
.fail(function() {
98
alert('Could not authenticate!');
109
});
11-
12-
});
10+
});
Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
var http = require('http'),
2-
express = require('express'),
3-
bodyParser = require('body-parser'),
4-
twilio = require('twilio');
2+
express = require('express'),
3+
bodyParser = require('body-parser'),
4+
twilio = require('twilio');
55

66
var app = express();
77
app.use(bodyParser.urlencoded({ extended: false }));
88

9-
app.post('/voice', function (req, res) {
10-
// Create TwiML response
11-
var twiml = new twilio.TwimlResponse();
12-
13-
if(req.body.To) {
14-
twiml.dial({ callerId: '+15017250604'}, function() {
15-
// wrap the phone number or client name in the appropriate TwiML verb
16-
// by checking if the number given has only digits and format symbols
17-
if (/^[\d\+\-\(\) ]+$/.test(req.body.To)) {
18-
this.number(req.body.To);
19-
} else {
20-
this.client(req.body.To);
21-
}
22-
});
23-
} else {
24-
twiml.say('Thanks for calling!');
25-
}
9+
app.post('/voice', function(req, res) {
10+
// Create TwiML response
11+
var twiml = new twilio.TwimlResponse();
2612

27-
res.set('Content-Type', 'text/xml');
28-
res.send(twiml.toString());
13+
if (req.body.To) {
14+
twiml.dial({ callerId: '+15017250604' }, function() {
15+
// wrap the phone number or client name in the appropriate TwiML verb
16+
// by checking if the number given has only digits and format symbols
17+
if (/^[\d\+\-\(\) ]+$/.test(req.body.To)) {
18+
this.number(req.body.To);
19+
} else {
20+
this.client(req.body.To);
21+
}
22+
});
23+
} else {
24+
twiml.say('Thanks for calling!');
25+
}
26+
27+
res.set('Content-Type', 'text/xml');
28+
res.send(twiml.toString());
2929
});
3030

3131
app.get('/token', function(req, res) {
3232
// TODO: generate token
3333
});
34-
34+
3535
http.createServer(app).listen(1337, '127.0.0.1');
36-
console.log('Twilio Client app server running at http://127.0.0.1:1337/');
36+
console.log('Twilio Client app server running at http://127.0.0.1:1337/');

0 commit comments

Comments
 (0)