Firebase.pushData()

Write data to your Firebase instance with the Push method.

This will parse your data from a string into a JSON object. Writing data with .Set() will overwrite all existing data on the child node. This is best used for new or replacement data. To add data to your child node without overwriting, use .push(). You can find out more about which write option to use here: https://www.firebase.com/docs/web/guide/saving-data.html

Usage

Hover over inputs/exits for more info.

var Firebase = require('machinepack-firebase');


// Write data to your Firebase instance with the Push method.

Firebase.pushData({

firebaseURL: 'your-firebase-database.firebaseio.com',

write: '*',

child: 'users',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

firebaseURL required

The reference URL for your Firebase dataset.

'your-firebase-database.firebaseio.com'
write required

The dataset you wish to write to your Firebase instance.

child

The child of your reference URL which you wish to write to.

'users'

Exits

error

An unexpected error occurred.

success

OK.

'-JmahDOMzYCH1R_gGEAL'