在使用firebase和我的访问令牌对NEST-API进行身份验证后,如何从摄像头对象中检索数据?我现在被困在这里......
var ref = new Firebase('wss://developer-api.nest.com');
ref.authWithCustomToken(access_token, function (error, authData) {
if (error) {
console.log("Authentication Failed!", error);
} else {
console.log("Authenticated successfully with payload:", authData);
}
});
答案 0 :(得分:0)
我找到它并且非常简单......
ref.on('value', function (snapshot) {
console.log(snapshot.val());
});
在这里找到了 - > https://brosteins.com/2014/07/20/beginning-with-the-nest-api/