כתיבה ל-Firestore באמצעות בקשת HTTP

שליחת בקשה מאומתת בתהליך עבודה, באמצעות OAuth 2.0 כדי לכתוב ל-Firestore.

דוגמת קוד

YAML

- initialize:
    assign:
      - project: "myproject123"
      - collection: "myEntries"
      - document: "Visits"
- write_item:
    call: http.request
    args:
      url: ${"https://firestore.googleapis.com/v1/projects/"+project+"/databases/(default)/documents/"+collection+"/"+document}
      auth:
        type: OAuth2
      method: PATCH
      body:
        name: ${"projects/"+project+"/databases/(default)/documents/"+collection+"/"+document}
        fields:
          Counter:
            integerValue: 7

המאמרים הבאים

כדי לחפש ולסנן דוגמאות קוד למוצרים אחרים של Google Cloud , אפשר להיעזר בGoogle Cloud דפדפן לדוגמה.