README.md in rest-firebase-0.9.5 vs README.md in rest-firebase-1.0.0
- old
+ new
@@ -1,6 +1,6 @@
-# rest-firebase [![Build Status](https://secure.travis-ci.org/CodementorIO/rest-firebase.png?branch=master)](http://travis-ci.org/CodementorIO/rest-firebase)
+# rest-firebase [![Build Status](https://secure.travis-ci.org/CodementorIO/rest-firebase.png?branch=master)](http://travis-ci.org/CodementorIO/rest-firebase) [![Coverage Status](https://coveralls.io/repos/CodementorIO/rest-firebase/badge.png)](https://coveralls.io/r/CodementorIO/rest-firebase)
by [Codementor][]
[Codementor]: https://www.codementor.io/
@@ -63,10 +63,21 @@
f = RestFirebase.new :site => 'https://SampleChat.firebaseIO-demo.com/',
:secret => 'secret',
:d => {:auth_data => 'something'},
:log_method => method(:puts),
+ # `timeout` in seconds
+ :timeout => 10,
+ # `max_retries` upon failures. Default is: `0`
+ :max_retries => 3,
+ # `retry_exceptions` for which exceptions should retry
+ # Default is: `[IOError, SystemCallError]`
+ :retry_exceptions =>
+ [IOError, SystemCallError, Timeout::Error],
+ # `error_callback` would get called each time there's
+ # an exception. Useful for monitoring and logging.
+ :error_callback => method(:p),
# `auth_ttl` describes when we should refresh the auth
# token. Set it to `false` to disable auto-refreshing.
# The default is 23 hours.
:auth_ttl => 82800,
# `auth` is the auth token from Firebase. Leave it alone
@@ -93,9 +104,12 @@
# Update users/tom.json
p f.put('users/tom', :some => 'data')
p f.post('users/tom', :some => 'other')
p f.get('users/tom')
p f.delete('users/tom')
+
+# With Firebase queries (it would encode query in JSON for you)
+p f.get('users/tom', :orderBy => '$key', :limitToFirst => 1)
# Need to tell onreconnect stops reconnecting, or even if we close
# the connection manually, it would still try to reconnect again.
@reconnect = false