Crate rusted_firebase

source ·
Expand description

Quick Start

use std::collections::HashMap;
use firebase_rs::{Firebase, Requestable, Paramable};
use serde_json::Value;

#[tokio::main]
async fn run() {
    let firebase =
           Firebase::new("https://hacker-news.firebaseio.com/v0/").expect("error init Firebase");
    let cons = firebase
           .at("topstories")
           .limit_to_first(7)
           .order_by("\"$key\"");
    let item_ids = endpoint.get::<Value>().await;

    println!("{:?}", item_ids);
}

Multi Client Backend

The default client is reqwest.

Available Client:

WASM Support

Only Support wasmedge now.

Cargo.toml example:

...
[dependencies]
tokio_wasi = { version = "1.25.1", features = ["full"] }

[dependencies.firebase-rs]
git = "https://github.com/jetjinser/firebase-rs"
default-features = false
features = ["wasmedge"]
...

Structs

  • Represents an instance of Firebase Realtime Database.
  • Represents an HTTP response
  • The URI component of a request.

Traits

  • A trait for adding parameters to a URL.
  • An async trait for making HTTP requests and deserializing responses.

Type Definitions

  • Result with Client Error