/ex_firebase

Firebase Admin SDK

Primary LanguageElixirMIT LicenseMIT

ExFirebase

Firebase Admin SDK in Elixir

Documentation

Installation

Install from Hex

def deps do
 [{:ex_firebase, "~> 0.2.0"}]
end

Or install from GitHub

def deps do
  [{:ex_firebase, github: "loopsocial/ex_firebase", branch: "master"}]
end

Run mix deps.get

Configuration

Setup Firebase and generate a private key for your service account

Add your Firebase Project ID and service account key path to your config/config.exs file:

config :ex_firebase,
  project_id: "your-project-id",
  service_account_path: "/path/to/your/key.json",
  queue_interval: 1000, # frequency in ms queued messages are sent
  queue_batch_size: 10 # number of messages sent per queue_interval

Instead of specifying a file with service_account_path, you can set the following variables:

config :ex_firebase,
  private_key: System.get_env("FIREBASE_PRIVATE_KEY"),
  client_email: System.get_env("FIREBASE_CLIENT_EMAIL")

Supported Features

License

MIT. See LICENSE file in repository.

FirebaseTM is trademark of Google LLC.