Skip to content

Commit

Permalink
docs(firestore): add documentation for Document,Collection .on_snapsh…
Browse files Browse the repository at this point in the history
…ot (#9275)

* add parameters in method on_snapshot of DocumentReference class

* docs: add parameters in method on-snapshot of Collection class
  • Loading branch information
HemangChothani authored and crwilcox committed Nov 7, 2019
1 parent 4963eee commit f250443
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion google/cloud/firestore_v1/collection.py
Expand Up @@ -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()))
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/firestore_v1/document.py
Expand Up @@ -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()))
Expand Down

0 comments on commit f250443

Please sign in to comment.