sample classification
This commit is contained in:
11
cloud-functions/python/functions/sample_classification.py
Normal file
11
cloud-functions/python/functions/sample_classification.py
Normal file
@@ -0,0 +1,11 @@
|
||||
def sample_classification(event, context):
|
||||
"""Triggered by a change to a Firestore document.
|
||||
Args:
|
||||
event (dict): Event payload.
|
||||
context (google.cloud.functions.Context): Metadata for the event.
|
||||
"""
|
||||
resource_string = context.resource
|
||||
# print out the resource string that triggered the function
|
||||
print(f"Function triggered by change to: {resource_string}.")
|
||||
# now print out the entire event object
|
||||
print(str(event))
|
||||
Reference in New Issue
Block a user