FB = new Firebase('https://xxx.firebase.io')
FB.auth(TOKEN, (err, result) => { ยทยทยท})
FB.authAnonymously(ยทยทยท)
FB.authWithPassword(ยทยทยท)
FB.authWithOAuthPopup(ยทยทยท)
FB.authWithOAuthToken(ยทยทยท)
Users = FB.child('users')
// Create
user = Users.push(first: "Frank", last: "Sinatra")
// Retrieve
user = Users.child('alan') // gets `users/alan`
// Update
user.set(first: "Miles", last: "Davis")
user.update(first: "Miles")
user.setWithPriority({ ยทยทยท }, priority)
// Getting
user.name() // primary id
user.once('value', (snap) => {
snap.name() // primary id
snap.val() // value
}, (err) => {
ยทยทยท
})
// traversal
user.parent()
Users = FB.child('users')
Users
.startAt(1000)
.limit(50)
.equalTo(priority, [name])
.on 'child_added', (snap) -> ยทยทยท
Posts = FB.child('posts')
post = Posts.push({ title: "How to do things", author: "alan" })