mobizt / FirebaseClient

🔥Async Firebase Client for Arduino. Supports Realtime Database, Cloud Firestore Database, Firebase Storage, Cloud Messaging, Google Cloud Functions and Google Cloud Storage.
MIT License
125 stars 7 forks source link

Error when try to patch document by FirebaseClient.h #9

Closed Engine1992 closed 7 months ago

Engine1992 commented 7 months ago

Hey.

I tried to use patchDocument example but when I compile the code, output of Arduino IDE shows:

error: 'PatchDocumentOptions' was not declared in this scope PatchDocumentOptions patchOptions(DocumentMask("count,status") / updateMask /, DocumentMask() / mask /, Precondition() / precondition /);

note: suggested alternative: 'patchDocumentOptions' PatchDocumentOptions patchOptions(DocumentMask("count,status") / updateMask /, DocumentMask() / mask /, Precondition() / precondition /);

Code snippnet:

PatchDocumentOptions patchOptions(DocumentMask("count,status") /* updateMask */, DocumentMask() /* mask */, Precondition() /* precondition */);

Docs.patch(aClient, Firestore::Parent(FIREBASE_PROJECT_ID), documentPath, patchOptions, doc, asyncCB);

The FirebaseClient library is included, another things works - the problem is only with the "PatchDocumentOptions". Trying to use small letter on "patch", function not working. How to deal with it?

mobizt commented 7 months ago

There is no compile error in Arduino IDE and PlatformIO from my test.

You have to remove the library and install again.