From 77196be1ca305d6c34c80eb29519f1ee00b3f3c9 Mon Sep 17 00:00:00 2001 From: John Reese Date: Wed, 5 Oct 2011 15:25:59 -0400 Subject: [PATCH] Initial support for Boxcar API Issue #226 --- push.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/push.cpp b/push.cpp index 30730c7..6855297 100644 --- a/push.cpp +++ b/push.cpp @@ -246,6 +246,25 @@ class CPushMod : public CModule params["title"] = title; params["uri"] = uri; } + else if (service == "boxcar") + { + if (options["username"] == "") + { + PutModule("Error: username not set"); + return; + } + + CString boxcar_api_key = "puSd2qp2gCDZO7nWkvb9"; + CString boxcar_api_secret = "wLQQKSyGybIOkggbiKipefeYGLni9B3FPZabopHp"; + + service_host = "boxcar.io"; + service_url = "/devices/providers/" + boxcar_api_key + "/notifications"; + + params["email"] = options["username"]; + params["notification[from_screen_name]"] = context; + params["notification[message]"] = short_message; + params["notification[source_url]"] = uri; + } else { PutModule("Error: service type not selected");