2017-10-05 32 views
1

我是雲端函數的新手,我認爲它們很酷。我已經搜索了可以通過「事件」調用的完整方法列表以及如何使用它們的文檔,但是我沒有找到任何方法。以下代碼中的示例用於調用data.current.child等。有人可以幫助我找到「事件」下方法的文檔。Cloud Functions「event =>」Documentation

exports.getPath = functions.database.ref('/Transaction/{id}') 
.onWrite(event => { 
    // Grab the current value of what was written to the Realtime Database. 
    const trans = event.data.current.child('Request').val(); 

回答

2

爲雲功能Event接口的文檔是provided here

事件中的數據取決於事件類型。有類每個:

  • AnalyticsEvent Analytics(分析)事件
  • UserRecord用於驗證的事件。
  • DeltaSnapshot實時數據庫事件。
  • Message適用於酒吧/小型活動。
  • ObjectMetadata for Storage events
+0

非常感謝Bob – MbaiMburu

相關問題