Skip to content

Commit

Permalink
Added support for the Prowl service
Browse files Browse the repository at this point in the history
Issue #226
  • Loading branch information
amyreese committed Oct 6, 2011
1 parent 77196be commit e418634
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions push.cpp
Expand Up @@ -265,6 +265,23 @@ class CPushMod : public CModule
params["notification[message]"] = short_message;
params["notification[source_url]"] = uri;
}
else if (service == "prowl")
{
if (options["secret"] == "")
{
PutModule("Error: secret not set");
return;
}

service_host = "api.prowlapp.com";
service_url = "/publicapi/add";

params["apikey"] = options["secret"];
params["application"] = app;
params["event"] = title;
params["description"] = short_message;
params["url"] = uri;
}
else
{
PutModule("Error: service type not selected");
Expand Down Expand Up @@ -858,6 +875,10 @@ class CPushMod : public CModule
{
PutModule("Note: Boxcar requires setting the 'username' option");
}
else if (value == "prowl")
{
PutModule("Note: Prowl requires setting the 'secret' option");
}
else
{
PutModule("Error: unknown service name");
Expand Down

0 comments on commit e418634

Please sign in to comment.