{"id":15024607,"url":"https://github.com/emreyalvac/firebase-rs","last_synced_at":"2025-05-15T18:02:42.170Z","repository":{"id":43761948,"uuid":"259289661","full_name":"emreyalvac/firebase-rs","owner":"emreyalvac","description":"Rust based Firebase library","archived":false,"fork":false,"pushed_at":"2025-03-16T09:37:36.000Z","size":74,"stargazers_count":167,"open_issues_count":1,"forks_count":21,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T22:21:42.121Z","etag":null,"topics":["database","firebase","realtime-database","rust","server-sent-events"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/firebase-rs","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emreyalvac.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-27T11:09:57.000Z","updated_at":"2025-03-29T11:15:13.000Z","dependencies_parsed_at":"2024-06-13T08:24:39.059Z","dependency_job_id":"eaea5f5d-b498-43c1-8274-9854fb2b1ff5","html_url":"https://github.com/emreyalvac/firebase-rs","commit_stats":{"total_commits":42,"total_committers":5,"mean_commits":8.4,"dds":"0.26190476190476186","last_synced_commit":"053cad8fc1b0280b6ca0c07f1647f02a2694740f"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emreyalvac%2Ffirebase-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emreyalvac%2Ffirebase-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emreyalvac%2Ffirebase-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emreyalvac%2Ffirebase-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emreyalvac","download_url":"https://codeload.github.com/emreyalvac/firebase-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247744332,"owners_count":20988783,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","firebase","realtime-database","rust","server-sent-events"],"created_at":"2024-09-24T20:00:38.372Z","updated_at":"2025-04-07T23:08:15.655Z","avatar_url":"https://github.com/emreyalvac.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# firebase-rs\n\n[![Crates.io](https://img.shields.io/crates/v/firebase-rs.svg)](https://crates.io/crates/firebase-rs) [![docs.rs](https://docs.rs/firebase-rs/badge.svg)](https://docs.rs/firebase-rs) [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)\n\nRust based Firebase library.\n---\n![firebase](https://firebase.google.com/downloads/brand-guidelines/SVG/logo-logomark.svg 'Firebase')\n\n# Full Documentation\n\n[Documentation](https://docs.rs/firebase-rs/2.2.1/firebase_rs/)\n\n# Features\n\n- Server-Sent Events (a.k.a stream) (https://github.com/emreyalvac/firebase-rs#read-data-as-stream)\n- Generic Payload\n\n# How to use\n\n### Load library\n\n````rust\nuse firebase_rs::*;\n````\n\n### Without Auth\n\n````rust\nlet firebase = Firebase::new(\"https://myfirebase.firebaseio.com\").unwrap();\n````\n\n### With Auth\n\n````rust\nlet firebase = Firebase::auth(\"https://myfirebase.firebaseio.com\", \"AUTH_KEY\").unwrap();\n````\n\n---\n\n### At usage for nested objects\n\n````rust\nlet firebase = Firebase::new(\"https://myfirebase.firebaseio.com\").unwrap().at(\"users\").at(\"USER_ID\").at(...);\n````\n\n---\n\n### Read Data as Stream\n\n### With Real Time Events\n\n````rust\nlet firebase = Firebase::new(\"https://myfirebase.firebaseio.com\").at(\"users\").unwrap();\nlet stream = firebase.with_realtime_events().unwrap();\nstream\n.listen( | event_type, data| {\nprintln ! (\"Type: {:?} Data: {:?}\", event_type, data);\n}, | err| println!(\"{:?}\", err), false).await;\n````\n\n### Read Data\n\n#### Read data as string\n\n````rust\nlet firebase = Firebase::new(\"https://myfirebase.firebaseio.com\").unwrap().at(\"users\");\nlet users = firebase.get_as_string().await;\n````\n\n#### Read data with generic type (All)\n\n````rust\n#[derive(Serialize, Deserialize, Debug)]\nstruct User {\n    name: String\n}\n\nlet firebase = Firebase::new(\"https://myfirebase.firebaseio.com\").unwrap().at(\"users\");\nlet user = firebase.get::\u003cHashMap\u003cString, User\u003e\u003e ().await;\n````\n\n#### Read data with generic type (Single record)\n\n````rust\n#[derive(Serialize, Deserialize, Debug)]\nstruct User {\n    name: String\n}\n\nlet firebase = Firebase::new(\"https://myfirebase.firebaseio.com\").unwrap().at(\"users\").at(\"USER_ID\");\nlet user = firebase.get::\u003cUser\u003e().await;\n````\n\n---\n\n### Set Data with Custom Key\n\n````rust\n#[derive(Serialize, Deserialize, Debug)]\nstruct User {\n    name: String\n}\n\nlet user = User { name: String::default () };\nlet mut firebase = Firebase::new(\"https://myfirebase.firebaseio.com\").unwrap().at(\"users\");\nfirebase.set_with_key(\"myKey\", \u0026user).await;\n````\n_Output_\n```json\n{\n  \"users\": {\n    \"myKey\": {\n      \"name\": \"\"\n    }\n  }\n}\n```\n\n### Set Data\n\n````rust\n#[derive(Serialize, Deserialize, Debug)]\nstruct User {\n    name: String\n}\n\nlet user = User { name: String::default () };\nlet firebase = Firebase::new(\"https://myfirebase.firebaseio.com\").unwrap().at(\"users\");\nfirebase.set(\u0026user).await;\n````\n_Output_\n```json\n{\n  \"users\": {\n    \"-OC9mYIUIdY3JygkmsFQ\": {\n      \"name\": \"\"\n    }\n  }\n}\n```\n\n---\n\n### Update Data\n\n````rust\n#[derive(Serialize, Deserialize, Debug)]\nstruct User {\n    name: String\n}\n\nlet user = User { name: String::default () };\nlet firebase = Firebase::new(\"https://myfirebase.firebaseio.com\").unwrap().at(\"users\").at(\"USER_ID\");\nfirebase.update( \u0026user).await;\n````\n\n---\n\n### With Params\n\n````rust\nlet firebase = Firebase::new(\"https://myfirebase.firebaseio.com\").unwrap().with_params().start_at(1).order_by(\"name\").equal_to(5).finish();\nlet result = firebase.get().await;\n````\n\n## Contributors\n\nThanks goes to these wonderful people ✨\n\n\u003ca href=\"https://github.com/emreyalvac/firebase-rs/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=emreyalvac/firebase-rs\" /\u003e\n\u003c/a\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femreyalvac%2Ffirebase-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femreyalvac%2Ffirebase-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femreyalvac%2Ffirebase-rs/lists"}