From 504595096563e7a500063615d07bd148de1dab56 Mon Sep 17 00:00:00 2001 From: yalvac Date: Tue, 26 Jul 2022 23:06:57 +0300 Subject: [PATCH] 2.0.4 release --- Cargo.lock | 2 +- Cargo.toml | 4 ++-- README.md | 2 +- src/lib.rs | 38 ++++++++++++++++++++++---------------- 4 files changed, 26 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 64bb963..4f958fc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -71,7 +71,7 @@ dependencies = [ [[package]] name = "firebase-rs" -version = "2.0.3" +version = "2.0.4" dependencies = [ "reqwest", "serde", diff --git a/Cargo.toml b/Cargo.toml index 3c3e867..7b8c685 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "firebase-rs" edition = "2021" -version = "2.0.3" +version = "2.0.4" description = "Rust based Firebase library" readme = "README.md" repository = "https://github.com/emreyalvac/firebase-rs" -documentation = "https://docs.rs/firebase-rs/2.0.3/firebase_rs/" +documentation = "https://docs.rs/firebase-rs/2.0.4/firebase_rs/" license = "MIT" authors = ["Emre YALVAƇ "] exclude = ["examples/*", "tests/*"] diff --git a/README.md b/README.md index 34b50b4..a94b2e4 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Rust based Firebase library. ![firebase](https://firebase.google.com/downloads/brand-guidelines/SVG/logo-logomark.svg 'Firebase') # Full Documentation -[Documentation](https://docs.rs/firebase-rs/2.0.3/firebase_rs/) +[Documentation](https://docs.rs/firebase-rs/2.0.4/firebase_rs/) # TODO diff --git a/src/lib.rs b/src/lib.rs index adffcd1..d2cfe69 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -22,6 +22,7 @@ pub struct Firebase { impl Firebase { /// ``` /// use firebase_rs::Firebase; + /// /// let firebase = Firebase::new("https://myfirebase.firebaseio.com").unwrap(); /// ``` pub fn new(uri: &str) -> UrlParseResult @@ -36,6 +37,7 @@ impl Firebase { /// ``` /// use firebase_rs::Firebase; + /// /// let firebase = Firebase::new("https://myfirebase.firebaseio.com").unwrap(); /// ``` pub fn auth(uri: &str, auth_key: &str) -> UrlParseResult @@ -53,9 +55,10 @@ impl Firebase { /// ```rust /// use firebase_rs::Firebase; + /// /// # async fn run() { - /// let firebase = Firebase::new("https://myfirebase.firebaseio.com").unwrap().with_params().start_at(1).order_by("name").equal_to(5).finish(); - /// let result = firebase.get::().await; + /// let firebase = Firebase::new("https://myfirebase.firebaseio.com").unwrap().with_params().start_at(1).order_by("name").equal_to(5).finish(); + /// let result = firebase.get::().await; /// # } /// ``` pub fn with_params(&self) -> Params { @@ -65,6 +68,7 @@ impl Firebase { /// ``` /// use firebase_rs::Firebase; + /// /// let firebase = Firebase::new("https://myfirebase.firebaseio.com").unwrap().at("users").at("USER_ID").at("f69111a8a5258c15286d3d0bd4688c55"); /// ``` pub fn at(&mut self, path: &str) -> Self { @@ -94,6 +98,7 @@ impl Firebase { /// ``` /// use firebase_rs::Firebase; + /// /// let firebase = Firebase::new("https://myfirebase.firebaseio.com").unwrap().at("users"); /// let uri = firebase.get_uri(); /// ``` @@ -192,9 +197,9 @@ impl Firebase { /// } /// /// # async fn run() { - /// let user = User { name: String::default() }; - /// let firebase = Firebase::new("https://myfirebase.firebaseio.com").unwrap().at("users"); - /// let users = firebase.set(&user).await; + /// let user = User { name: String::default() }; + /// let firebase = Firebase::new("https://myfirebase.firebaseio.com").unwrap().at("users"); + /// let users = firebase.set(&user).await; /// # } /// ``` pub async fn set(&self, data: &T) -> RequestResult @@ -216,8 +221,8 @@ impl Firebase { /// } /// /// # async fn run() { - /// let firebase = Firebase::new("https://myfirebase.firebaseio.com").unwrap().at("users"); - /// let users = firebase.get::>().await; + /// let firebase = Firebase::new("https://myfirebase.firebaseio.com").unwrap().at("users"); + /// let users = firebase.get::>().await; /// # } /// ``` pub async fn get_as_string(&self) -> RequestResult { @@ -235,13 +240,13 @@ impl Firebase { /// } /// /// # async fn run() { - /// let firebase = Firebase::new("https://myfirebase.firebaseio.com").unwrap().at("users").at("USER_ID"); - /// let user = firebase.get::().await; + /// let firebase = Firebase::new("https://myfirebase.firebaseio.com").unwrap().at("users").at("USER_ID"); + /// let user = firebase.get::().await; /// /// // OR /// - /// let firebase = Firebase::new("https://myfirebase.firebaseio.com").unwrap().at("users"); - /// let user = firebase.get::>().await; + /// let firebase = Firebase::new("https://myfirebase.firebaseio.com").unwrap().at("users"); + /// let user = firebase.get::>().await; /// # } /// ``` pub async fn get(&self) -> RequestResult @@ -253,9 +258,10 @@ impl Firebase { /// ``` /// use firebase_rs::Firebase; + /// /// # async fn run() { - /// let firebase = Firebase::new("https://myfirebase.firebaseio.com").unwrap().at("users").at("USER_ID"); - /// firebase.delete().await; + /// let firebase = Firebase::new("https://myfirebase.firebaseio.com").unwrap().at("users").at("USER_ID"); + /// firebase.delete().await; /// # } /// ``` pub async fn delete(&self) -> RequestResult { @@ -272,9 +278,9 @@ impl Firebase { /// } /// /// # async fn run() { - /// let user = User { name: String::default() }; - /// let firebase = Firebase::new("https://myfirebase.firebaseio.com").unwrap().at("users").at("USER_ID"); - /// let users = firebase.update(&user).await; + /// let user = User { name: String::default() }; + /// let firebase = Firebase::new("https://myfirebase.firebaseio.com").unwrap().at("users").at("USER_ID"); + /// let users = firebase.update(&user).await; /// # } /// ``` pub async fn update(&self, data: &T) -> RequestResult