Reputation: 928
I've looked at different ruby gems like firebase-ruby and rest-firebase, but the gems don't integrate well with rails.
My question is, is there an easier way of using the ApplicationRecord design pattern with Firebase as my backend?
Upvotes: 12
Views: 15433
Reputation: 3998
Firstly you need to get two things
After that just pass these in headers
{"Authorization" => "key=#{FIREBASE_SERVER_API_KEY}", "Content-Type" => "application/json"}
And in body pass these
{"registration_ids":
["pass-device-token"],
"priority":"high",
"data":{}}
Upvotes: 17