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?
The Google Cloud client libraries support Firebase access in Java, Python, Node. js, Go, PHP, C#, and Ruby. To get started with one of the Google Cloud client libraries, see the Quickstart using a Server Client Library.
Firebase is a Backend-as-a-Service (BaaS) app development platform that provides hosted backend services such as a realtime database, cloud storage, authentication, crash reporting, machine learning, remote configuration, and hosting for your static files.
API Usage. You can use any Firebase Realtime Database URL as a REST endpoint. All you need to do is append . json to the end of the URL and send a request from your favorite HTTPS client.
Using the Firebase CLI, you deploy files from local directories on your computer to our Hosting servers. Beyond serving static content, you can use Cloud Functions for Firebase or Cloud Run to serve dynamic content and host microservices on your sites.
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":{}}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With