TODO: Write a description here
Add this to your application's shard.yml
:
dependencies:
fcm:
github: r3bo0t/fcm
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
- Fork it ( https://github.com/[your-github-name]/fcm/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
- [your-github-name] r3bo0t - creator, maintainer