Closed illegalprime closed 9 years ago
API Changes make this library more like the Javascript API:
let firebase = Firebase::new("https://shining-torch-7752.firebaseio.com");
let david = firebase.at("/users/david.json");
let res = david.set("{\"firstName\":\"Dave\"}");
println!("Response body: {:?}", res.body);
println!("Response code: {:?}", res.code);
println!("Response success: {:?}", res.is_success());
let res = david.get();
println!("Response body: {:?}", res.body);
println!("Response code: {:?}", res.code);
println!("Response success: {:?}", res.is_success());
Now authentication has been implemented, and users do not have to add the ".json" extension in the path explicitly anymore!
REST query parameters have been implemented!
Looks good, my first crack at this project was using an unofficial Ruby gem as a reference point (https://github.com/oscardelben/firebase-ruby). I'd considered restructuring to be more similar to the JavaScript API, just hadn't found the time to do so.
I think my only comment would be changing the delete()
method to remove()
to keep it consistent with the JavaScript API.
Forgot to say awesome work though, I'd be more than happy to add you as an author.
How do you update crates.io?
I've updated crates.io now, there's no way in that system to add users to publish but I'm thinking since you're now showing as an author you might be able to publish in the future.
This makes reusing the Firebase object possible (since it is not moved then destroyed).