use fireplace::{
ServiceAccount,
firestore::{
client::{FirestoreClient, FirestoreClientOptions},
collection,
},
};
#[tokio::main]
async fn main() {
let service_account = ServiceAccount::from_file("./test-service-account.json").unwrap();
let client_options = FirestoreClientOptions::default();
let mut client = FirestoreClient::initialise(service_account, client_options)
.await
.unwrap();
let doc_ref = collection("greetings").doc("first");
let doc = serde_json::json!({ "message": "Hi Mom" });
client.set_document(&doc_ref, &doc).await.unwrap();
}