Introduction: Firebase Qt API

Firebase Qt API is a 3rd party firebase wrapper.Firebase is a powerful tool if you are a mobile developer. You won’t be concerning for your backend whilst developing your mobile app. But with the IoT revolution backend for your applications on Arduino,raspberry pi, beaglebone becomes crucial. So developing an API for Firebase with a qt development environment became a necessity for me.

Step 1: Sources and Usage

Library is on github and it is a complete source and also an example.

To be able to use qt-firebase you need to define a Firebase object like shown:

Firebase *firebase=new Firebase("https://firexample.firebaseio.com/");

*Auth Also if your firebase uses a security you should pass firebase token.(Token generation is on the way)

firebase->setToken("cxOMEbyj7kdt7tlHsw8lhlj2W4T5ea5lVxBzgRUE");

*Reading Data Reading data is achieved with getValue() call.

firebase->getValue();

*Writing Data

firebase->child("exampledata")->setValue("test1");

Also : In order to add child to another child use:

Firebase *childFirebase=firebase->child("exampledata3"); 
  childFirebase->child("examplechild data")->setValue("test child1");

Get Events: To get events or data feedback from your firebase child firebase you must connect eventResponseReady signal to some slot like :

connect(firebase,SIGNAL(eventResponseReady(QString)),this,SLOT(onResponseReady(QString)));

For more information please examine qt example. And visit : http://developwear.com/blog/2016/03/09/firebase-qt-api/