From 879d9a13fbcac0c6d2b222461a3930fcd0d03734 Mon Sep 17 00:00:00 2001 From: HemangChothani <50404902+HemangChothani@users.noreply.github.com> Date: Thu, 7 Nov 2019 23:07:01 +0530 Subject: [PATCH] docs(firestore): add documentation for Document,Collection .on_snapshot (#9275) * add parameters in method on_snapshot of DocumentReference class * docs: add parameters in method on-snapshot of Collection class --- firestore/google/cloud/firestore_v1/collection.py | 2 +- firestore/google/cloud/firestore_v1/document.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/firestore/google/cloud/firestore_v1/collection.py b/firestore/google/cloud/firestore_v1/collection.py index 165e0dfb3afa..23e05189577d 100644 --- a/firestore/google/cloud/firestore_v1/collection.py +++ b/firestore/google/cloud/firestore_v1/collection.py @@ -446,7 +446,7 @@ def on_snapshot(self, callback): db = firestore_v1.Client() collection_ref = db.collection(u'users') - def on_snapshot(collection_snapshot): + def on_snapshot(collection_snapshot, changes, read_time): for doc in collection_snapshot.documents: print(u'{} => {}'.format(doc.id, doc.to_dict())) diff --git a/firestore/google/cloud/firestore_v1/document.py b/firestore/google/cloud/firestore_v1/document.py index df2861c1579d..571315e87563 100644 --- a/firestore/google/cloud/firestore_v1/document.py +++ b/firestore/google/cloud/firestore_v1/document.py @@ -512,7 +512,7 @@ def on_snapshot(self, callback): db = firestore_v1.Client() collection_ref = db.collection(u'users') - def on_snapshot(document_snapshot): + def on_snapshot(document_snapshot, changes, read_time): doc = document_snapshot print(u'{} => {}'.format(doc.id, doc.to_dict()))