Firebase ReferenceError:未定义“ getDatabaseByUrl”。 (第14行,文件“代码”)

时间:2018-08-07 03:01:26

标签: firebase firebase-realtime-database google-apps-script google-sheets

尝试获取GetDatabaseByURL时出现错误-这是我的代码。如果有人能够让我知道错误是什么,将不胜感激。

function getData() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var spreadsheet = SpreadsheetApp.getActive();
var sheet = SpreadsheetApp.openById("1iBbmL5crQGFWnQzACOzKhip-KSInd0lCu6za-I2TXzY");
var range = spreadsheet.getRange('A1:B2')
var data = getFirebaseData('myArray')
Logger.log(data)
range.setValues(JSON.parse(data))
}

function getFirebaseData(data) {
var firebaseurl = 'https://ionafusion.firebaseio.com/'
var secret = 'LCOrPeYk4v4MTxb33pmErXjERdtAjdUakfBooSHd'
var base = getDatabaseByUrl(firebaseurl, secret);
var result = base.getData(data);
return result;
}

Firebase ReferenceError: "getDatabaseByUrl" is not defined. (line 14, file "Code")

0 个答案:

没有答案