Skip to content

Instantly share code, notes, and snippets.

@ifitzpat
Last active September 23, 2015 10:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ifitzpat/81250784127a93830e31 to your computer and use it in GitHub Desktop.
Save ifitzpat/81250784127a93830e31 to your computer and use it in GitHub Desktop.
R script to send notifications to boxcar
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