如何使用 firebase 云函数检索 {pushId}?

How can retrieve {pushId} with firebase cloud functions?

我正在学习 firebase 云函数。我有一个看起来像这样的函数:

exports.gameLoopBeing = functions.database.ref('/tables/{pushId}/gamestarted')
    .onWrite(event => {
    //I want to retrieve the pushID        
    console.log(event.data.pushID);

});

event.data.pushID 显然不行。如何检索 pushID?我查看了 docs,但找不到任何内容。

对于那些不知道 pushId 的人。这个函数监听 /table 中元素内部所做的每一个变化。例如:

ref路径中的通配符在事件params对象中提供:

exports.gameLoopBeing = functions.database.ref('/tables/{pushId}/gamestarted')
    .onWrite(event => {
    //I want to retrieve the pushID        
    console.log(event.params.pushId);

});
exports.gameLoopBeing = functions.database.ref('/tables/{pushId}/gamestarted')
     .onWrite((change, context) => {
     //I want to retrieve the pushID        
      console.log(context.params.pushId);
    });