cartel v0.5.0 Cartel.Pusher.Gcm

Google GCM interface worker

Summary

Functions

Generate the registered process name for the requested app pusher

Sends the message via the specified worker process

Sends a push notification

Starts the pusher

Functions

name(appid)

Specs

name(String.t) :: atom

Generate the registered process name for the requested app pusher

push(pid, message)

Specs

push(pid, Cartel.Message.Gcm.t) :: :ok | :error

Sends the message via the specified worker process

send(appid, message, tokens \\ [])

Specs

send(String.t, Cartel.Message.Gcm.t, [String.t]) :: {:ok | :error}

Sends a push notification

  • appid: target application identifier present in config.exs
  • message: message struct
  • tokens: list of device tokens
start_link(args)

Specs

start_link(%{key: String.t}) :: GenServer.on_start

Starts the pusher