Xbasic
firestore_getDocument Function
Syntax
p firestore_getDocument(c serviceAccountConnectionString, c collection, c key)
Arguments
- serviceAccountConnectionString
Named Firestore service account connection string.
- collection
Collection name.
- key
Document ID.
Returns
- resultPointer
Has error, errorText, and result (the document data).
Description
Get a single document by ID.
Example
dim r as p
r = firestore_getDocument("::name::my_fs_connString","customers","Smith")
if r.error then
? r.errorText
else
? json_reformat(r.result)
end if