/one_signal

Elixir wrapper of OneSignal

Primary LanguageElixir

OneSignal

Elixir wrapper of OneSignal

Installation

If available in Hex, the package can be installed as:

  1. Add one_signal to your list of dependencies in mix.exs:
  def deps do
    [{:one_signal, "~> 0.0.6"}]
  end
  1. Ensure one_signal is started before your application:
  def application do
    [applications: [:one_signal]]
  end
  1. Puts config your config.exs
config :one_signal, OneSignal,
  api_key: "your api key",
  app_id: "your app id",

Composable design, Data structure oriented

  import OneSignal.Param
  OneSignal.new
  |> put_heading("Welcome!")
  |> put_message(:en, "Hello")
  |> put_message(:ja, "はろー")
  |> put_segment("Free Players")
  |> put_segment("New Players")
  |> notify