web_push_encryption v0.3.0 WebPushEncryption.Push View Source
Module to send web push notifications with a payload through GCM
Link to this section Summary
Functions
Sends a web push notification with a payload through GCM.
Link to this section Functions
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: ENDPOINT}
auth_token
[Optional] is the GCM api key matching thegcm_sender_id
from the clientmanifest.json
. It is not necessary for Mozilla endpoints.ttl
[Optional] is a non-negative integer Time To Live. It is the number of seconds that a message may be stored if the user is not immediately available. Mozilla Push Service only supports a maximum TTL of 5,184,000 seconds (about one month).
Return value
Returns the result of HTTPoison.post