15 lines
453 B
Elixir
15 lines
453 B
Elixir
|
defmodule Bump.Firebase do
|
||
|
|
||
|
def test() do
|
||
|
IO.puts "Hello, world!"
|
||
|
end
|
||
|
|
||
|
def push(sender, message) do
|
||
|
IO.puts "Pushing #{message} to #{sender}"
|
||
|
n = Pigeon.FCM.Notification.new({:token, "dTm8S2bfTdKYQTjrxnwFFg:APA91bHGgM7IdRS5uxD0ljmwmP6cAec2icX0VBs69iRB2ApsohyOWzTzontO7cBkjNYbWV87zvxrXIs5jHkJ-8mSWa_-RiU2Y8-XEy3g-Fep3z6dhDeM3KazP58jDRgbdB5cVpDcIEWL"}, %{"body" => message})
|
||
|
Bump.FCM.push(n)
|
||
|
%{status: 'cheese'}
|
||
|
end
|
||
|
|
||
|
end
|