2017-10-05 51 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

相关问题