web_push_encryption v0.1.1 WebPushEncryption.Push
Module to send web push notifications with a payload through GCM
Summary
Functions
Sends a web push notification with a payload through GCM
Functions
Specs
send_web_push(message :: binary, subscription :: map, auth_token :: binary) ::
{:ok, any} |
{:error, atom}
Sends a web push notification with a payload through GCM.
Arguments
messageis a binary payload. It can be JSON encodedsubscriptionis the subscription information received from the client. It should have the following form:%{keys: %{auth: AUTH, p256dh: P256DH}, endpoint: ENDPOIONT}auth_tokenis the GCM api key matching thegcm_sender_idfrom the clientmanifest.json
Return value
Returns the result of HTTPoison.post