3 prism_languages: [coffeescript]
11 FB = new Firebase('https://xxx.firebase.io')
12 FB.auth(TOKEN, (err, result) => { ···})
16 FB.authAnonymously(···)
17 FB.authWithPassword(···)
18 FB.authWithOAuthPopup(···)
19 FB.authWithOAuthToken(···)
25 Users = FB.child('users')
30 user = Users.push(first: "Frank", last: "Sinatra")
35 user = Users.child('alan') // gets `users/alan`
40 user.set(first: "Miles", last: "Davis")
41 user.update(first: "Miles")
42 user.setWithPriority({ ··· }, priority)
52 user.name() // primary id
54 user.once('value', (snap) => {
55 snap.name() // primary id
70 Users = FB.child('users')
74 .equalTo(priority, [name])
75 .on 'child_added', (snap) -> ···
80 Posts = FB.child('posts')
81 post = Posts.push({ title: "How to do things", author: "alan" })
87 * <https://www.firebase.com/docs/web/api/>
88 * <https://www.firebase.com/docs/web/recipes.html>