Added Twilio API template, controller and route; + twilio library.
This commit is contained in:
1
app.js
1
app.js
@ -115,6 +115,7 @@ app.get('/api/paypal/success', apiController.getPayPalSuccess);
|
||||
app.get('/api/paypal/cancel', apiController.getPayPalCancel);
|
||||
app.get('/api/steam', apiController.getSteam);
|
||||
app.get('/api/scraping', apiController.getScraping);
|
||||
app.get('/api/twilio', apiController.getTwilio);
|
||||
app.get('/api/foursquare', passportConf.isAuthenticated, passportConf.isAuthorized, apiController.getFoursquare);
|
||||
app.get('/api/tumblr', passportConf.isAuthenticated, passportConf.isAuthorized, apiController.getTumblr);
|
||||
app.get('/api/facebook', passportConf.isAuthenticated, passportConf.isAuthorized, apiController.getFacebook);
|
||||
|
@ -380,4 +380,12 @@ exports.getSteam = function(req, res, next) {
|
||||
playerSummary: results.playerSummaries.response.players[0]
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
exports.getTwilio = function(req, res, next) {
|
||||
res.render('api/twilio', {
|
||||
title: 'Twilio API'
|
||||
});
|
||||
|
||||
|
||||
};
|
@ -29,6 +29,7 @@
|
||||
"twit": "~1.1.12",
|
||||
"underscore": "~1.5.2",
|
||||
"paypal-rest-sdk": "~0.6.4",
|
||||
"connect-mongo": "~0.4.0"
|
||||
"connect-mongo": "~0.4.0",
|
||||
"twilio": "~1.5.0"
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,8 @@ block content
|
||||
small ⇢ Login Required
|
||||
li
|
||||
a(href='/api/steam') Steam
|
||||
li
|
||||
a(href='/api/twilio') Twilio
|
||||
li
|
||||
a(href='/api/tumblr') Tumblr
|
||||
small ⇢ Login Required
|
||||
|
28
views/api/twilio.jade
Normal file
28
views/api/twilio.jade
Normal file
@ -0,0 +1,28 @@
|
||||
extends ../layout
|
||||
|
||||
block content
|
||||
.page-header
|
||||
h2
|
||||
i.fa.fa-phone
|
||||
| Twilio API
|
||||
|
||||
.btn-group.btn-group-justified
|
||||
a.btn.btn-primary(href='http://developer.nytimes.com/page', target='_blank')
|
||||
i.fa.fa-check-square-o
|
||||
| Overview
|
||||
a.btn.btn-primary(href='http://prototype.nytimes.com/gst/apitool/index.html', target='_blank')
|
||||
i.fa.fa-laptop
|
||||
| API Console
|
||||
a.btn.btn-primary(href='http://developer.nytimes.com/docs', target='_blank')
|
||||
i.fa.fa-code-fork
|
||||
| API Endspoints
|
||||
|
||||
h4 Send a text message
|
||||
.row
|
||||
.col-sm-6
|
||||
form(method='POST')
|
||||
.form-group
|
||||
.input-group
|
||||
input.form-control(type='text', name='telephone')
|
||||
span.input-group-btn
|
||||
button.btn.btn-success(type='submit') Send
|
Reference in New Issue
Block a user