This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
________ _ _ __ | |
/_ __/ /_ (_)____ ____ _(_)____/ /_ | |
/ / / __ \/ / ___/ / __ `/ / ___/ __/ | |
/ / / / / / (__ ) / /_/ / (__ ) /__ | |
/_/ /_/ /_/_/____/ \__, /_/____/\__( ) | |
__ __ _ /____/ _ _|/ __ | |
/ /_/ /_ (_)____ ____ _(_)____/ /_/ / | |
/ __/ __ \/ / ___/ / __ `/ / ___/ __/ / | |
/ /_/ / / / (__ ) / /_/ / (__ ) /_/_/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "twilio-azure-functions-node", | |
"version": "1.0.0", | |
"description": "Receive SMS and calls with Azure Functions and Node.js", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "Twilio and your-name", | |
"license": "MIT", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const functions = require('firebase-functions') | |
// // Create and Deploy Your First Cloud Functions | |
// // https://firebase.google.com/docs/functions/write-firebase-functions | |
// | |
// exports.helloWorld = functions.https.onRequest((request, response) => { | |
// response.send("Hello from Firebase!"); | |
// }); | |
// Init Twilio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"bindings": [ | |
{ | |
"name": "myTimer", | |
"type": "timerTrigger", | |
"direction": "in", | |
"schedule": "0 10 19 * * *" | |
}, | |
{ | |
"type": "twilioSms", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const accountSid = process.env.TWILIO_SID; | |
const authToken = process.env.TWILIO_TOKEN; | |
const client = require('twilio')(accountSid, authToken); | |
module.exports = async function (context, myTimer) { | |
var timeStamp = new Date().toISOString(); | |
if (myTimer.IsPastDue) | |
{ | |
context.log('JavaScript is running late!'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const accountSid = process.env.TWILIO_SID; | |
const authToken = process.env.TWILIO_TOKEN; | |
const client = require('twilio')(accountSid, authToken); | |
module.exports = async function (context, myTimer) { | |
var timeStamp = new Date().toISOString(); | |
if (myTimer.IsPastDue) | |
{ | |
context.log('JavaScript is running late!'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
subscription_key = '<YOUR-SUBSCRIPTION-KEY>' | |
assert subscription_key | |
face_api_url = '<YOUR-FACEAPI-URL>' | |
image_url = 'https://pm1.narvii.com/5826/48f03a0d21f56888f42babb86d07459d09638d75_hq.jpg' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Lemmy", | |
"image": "https://www.mariowiki.com/images/thumb/f/fc/MK8_Lemmy_Icon.png/64px-MK8_Lemmy_Icon.png", | |
"text": "You're pretty chill, and have your moments of happiness. A tiny part of you loves to break the rules", | |
"msftvintage": "https://bit.ly/2w3JIwF", | |
"faceapidata": "sadness: 0.0, neutral: 0.27, contempt: 0.001, disgust: 0.0, anger: 0.0, surprise: 0.0, fear: 0.0, happiness: 0.729" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
subscription_key = '<YOUR-SUBSCRIPTION-KEY>' | |
assert subscription_key | |
face_api_url = '<YOUR-FACEAPI-URL>' | |
image_url = '<URL-OF-IMAGE>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const accountSid = process.env.TWILIO_SID; | |
const authToken = process.env.TWILIO_TOKEN; | |
const client = require('twilio')(accountSid, authToken); | |
// This can also be accomplished with a Twilio output binding- you can read more on this at http://aka.ms/AA4n3j | |
module.exports = async function (context){ | |
const twilioOptions = { | |
url: process.env.TWIML_URL, | |
to: process.env.RECIPIENT_NUMBER, |
NewerOlder