Skip to content
/ fcm.cr Public

Crystal bindings to Firebase Cloud Messaging (FCM) for Android, iOS or Web

License

Notifications You must be signed in to change notification settings

r3bo0t/fcm.cr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fcm

TODO: Write a description here

Installation

Add this to your application's shard.yml:

dependencies:
  fcm:
    github: r3bo0t/fcm

Usage

require "fcm"

fcm_object = Fcm::Base.new("####api-token", {})
fcm_token = "#####"
message = { "notification" => { "title" => "notification title", "body" => "notification body"}, "data" => {"any_other_key" => "any other data"}}
fcm_object.send(fcm_token, message) # sending push notification for single user
tokens = ["#####", "######", "#####"]
fcm_object.bulk_send(tokens, message) # For sending push notification for multiple users

Contributing

  1. Fork it ( https://github.com/[your-github-name]/fcm/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

About

Crystal bindings to Firebase Cloud Messaging (FCM) for Android, iOS or Web

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published