ex_signal v0.2.1 ExSignal View Source

Wrapper for the OneSignal REST API.

Installation

  1. Add ex_signal to your list of dependencies in mix.exs:
def deps do
  [{:ex_signal, "~> 0.1.0"}]
end
  1. Add this to your config.exs:
config :ex_signal,
  app_id: "your app id",
  api_key: "your api key"

To make testing easier, you can also provide your own ExSignal.Client implementation:

# test.exs
config :ex_signal, client: ClientMock

Link to this section Summary

Link to this section Functions

Link to this function

build_client(opts \\ [])

View Source

See ExSignal.Client.build_client/1.

Link to this function

create_notifications(params, client \\ build_client())

View Source

Sends notifications to your users.

https://documentation.onesignal.com/reference/create-notification#create-notification