EzFirestore

Support: All platforms

using XG.EzCloud; //add this directive to import types from EzCloud namespace

🚩 Save & Manage Document

  • Create or overwrite a single document (specified document ID). If the document does not exist, it will be created. If the document does exist, its contents will be overwritten with the newly provided data.

EzFirestore.SetDocument(documentPath, data, callback, fallback, objectName);

πŸ“„ Playmaker reference

  • Add a document to a collection. An ID is auto-generated.

EzFirestore.AddDocument(collectionPath, data, callback, fallback, objectName);

πŸ“„ Playmaker reference


EzFirestore.CreateReference(collectionPath, data, callback, fallback);

  • Update some fields of a document without overwriting the entire document.

EzFirestore.UpdateDocument(documentPath, data, callback, fallback, objectName);

πŸ“„ Playmaker reference

  • Update a specific field of a document without overwriting the entire document.

EzFirestore.UpdateField(documentPath, fieldName, data, callback, fallback, objectName);

πŸ“„ Playmaker reference

Delete

  • Delete a document. Subcollections will not be deleted.

EzFirestore.DeleteDocument(documentPath, callback, fallback, objectName);

πŸ“„ Playmaker reference

  • Delete a specific field from a document.

EzFirestore.DeleteField(documentPath, fieldName, callback, fallback, objectName);

πŸ“„ Playmaker reference

🚩 Load Document

You can either use callback containing a snapshot of the document normally or get it with async/await.

Read document once

  • Retrieve the contents of a single document.

EzFirestore.LoadDocument(documentPath, callback, fallback, objectName);

var result = await EzFirestore.LoadDocument(documentPath, fallback);

πŸ“„ Playmaker reference

  • Get multiple documents from a collection

Query (coming soon)

Listen for updates (Pro only)

  • Retrieve the contents of a single document.

var listener = EzFirestore.ListenDocument(documentPath, callback);

πŸ“„ Playmaker reference

  • Get multiple documents from a collection

Query (coming soon)