diff --git a/R/smack_my_bitch_up.R b/R/smack_my_bitch_up.R index b16d7e2..823fce3 100644 --- a/R/smack_my_bitch_up.R +++ b/R/smack_my_bitch_up.R @@ -1,4 +1,4 @@ - +library(httr) today = Sys.Date() @@ -27,3 +27,8 @@ reasons = c( 'Someone fucked the system again' ) +POST(paste("https://api.twilio.com/2010-04-01/Accounts/",TWILIO_ACCOUNT_SID,"/Messages.json",sep=""), + body = list(From=my_number,To=her_number,Body=sample(reasons,1) ), + authenticate(TWILIO_ACCOUNT_SID,TWILIO_AUTH_TOKEN) ) + +print( paste("Message sent at",Sys.time()) )