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
04cad85cc20d5340da9ba8ef4301f0f57dba0c951d3f7e6bc3e6f59ee03652487b6ddac60083d45b2b774820b6240c0e4cc8ec9e41a9d446dd50d05ef9b6dd7d22;kevinchau |
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
/* | |
* File: UniversalHealthCoverage.cpp | |
* ---------------------- | |
* Name: robertdo | |
* Section: mmateen | |
* This file is the starter project for the UniversalHealthCoverage problem | |
* on Assignment #3. | |
*/ | |
#include <iostream> | |
#include <string> |
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 webapp2 | |
from twilio import twiml | |
from twilio.rest import TwilioRestClient | |
class SendSMS(webapp2.RequestHandler): | |
def get(self): | |
# replace with your credentials from: https://www.twilio.com/user/account | |
account_sid = "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" | |
auth_token = "xxxxxxxxxxxxxxxxxxxxxxxxxx" | |
client = TwilioRestClient(account_sid, auth_token) |
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 the webapp2 framework, the Mail API, and Twilio Rest Client | |
import webapp2 | |
from google.appengine.api import mail | |
from twilio.rest import TwilioRestClient | |
account = "ACXXXXXXXXXXXXXXXXX" | |
token = "YYYYYYYYYYYYYYYYYY" | |
client = TwilioRestClient(account, token) | |
# This is the handler that gets called when your app is visited |
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
class SendEmail(webapp2.RequestHandler): | |
def get(self): | |
... | |
message.send() | |
# Send the SMS confirmation | |
# Get the number of the SMS sender | |
sms_sender = self.request.get('From') | |
sms = client.sms.messages.create(to=sms_sender, from_="+16504253645", | |
body="Your email has been sent to %s" % recipient) |
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
from twilio.rest import TwilioRestClient | |
account = "ACXXXXXXXXXXXXXXXXX" | |
token = "YYYYYYYYYYYYYYYYYY" | |
client = TwilioRestClient(account, token) |
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 the webapp2 framework | |
import webapp2 | |
from google.appengine.api import mail | |
# This is the handler that gets called when your app is visited | |
class SendEmail(webapp2.RequestHandler): | |
def get(self): | |
# Get the recipient from the text message. | |
# The recipient is the body of the text message. | |
recipient = self.request.get('Body') |