package

github.com/9to6/fcm

master / published Aug 13, 2018 / repository

Fcm client for Crystal-lang

fcm

Firebase notification client for Crystal language

Installation

Add this to your application's shard.yml:

dependencies:
  fcm:
    github: 9to6/fcm

Usage

require "fcm"

fcm = Fcm::Fcm.new("api-token")
# fcm.send(registration_ids: ["4sdsx", "8sdsd"], {data: {score: "5x1"}})
fcm.send(["4sdsx", "8sdsd"], {data: {score: "5x1"}}.to_h)

fcm.send_to_topic("news")

API