User Foo has these friends:
- mr_wolf
- marcellus.Wallace
Now something w/ Foo
happened, and all the friends need to be send a mobile push notification.
curl -3 -u "{PushApplicationID}:{MasterSecret}"
-v -H "Accept: application/json" -H "Content-type: application/json"
-X POST
-d '{
"alias" : ["mr_wolf", "marcellus.Wallace"],
"message": {"alert":"Foo has a new picture!"}
}'
https://SERVER:PORT/CONTEXT/rest/sender
Or use the Java client we have:
JavaSender defaultJavaSender =
new SenderClient("http://localhost:8080/ag-push");
UnifiedMessage unifiedMessage = new UnifiedMessage.Builder()
.pushApplicationId("something")
.masterSecret("something")
.aliases(Arrays.asList("mr_wolf", "marcellus.Wallace"))
.alert("Foo has a new picture!")
.build();
defaultJavaSender.send(unifiedMessage, optinalCallback);