From d9ac2b7ca2ef9484154bca0c50bf3cb6c8a8ae1f Mon Sep 17 00:00:00 2001 From: Samir Madhavan Date: Sat, 28 Nov 2015 14:12:07 +0530 Subject: [PATCH] R version of smack my bitch is ready --- R/smack_my_bitch_up.R | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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()) )