Last active
September 23, 2015 10:47
-
-
Save ifitzpat/81250784127a93830e31 to your computer and use it in GitHub Desktop.
R script to send notifications to boxcar
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
notifyBoxcar = function(token,mytitle,message){ | |
require(httr) | |
query = POST("https://new.boxcar.io/api/notifications", | |
body = list("user_credentials" = token, | |
"notification[title]" = mytitle, | |
"notification[long_message]" = message, | |
"notification[sound]" = "clanging", | |
"notification[source_name]" = "R script", | |
"notification[icon_url]" = "http://www.r-project.org/Rlogo.jpg")) | |
stop_for_status(query) | |
content(query, "parsed", "application/json") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment