web_push_encryption v0.1.0 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
message
is a binary payload. It can be JSON encodedsubscription
is the subscription information received from the client. It should have the following form:%{keys: %{auth: AUTH, p256dh: P256DH}, endpoint: ENDPOIONT}
auth_token
is the GCM api key matching thegcm_sender_id
from the clientmanifest.json
Return value
Returns the result of HTTPoison.post