Firebase REST API 文档有一个发布数据列表的示例:
curl -X POST -d '{
"author": "alanisawesome",
"title": "The Turing Machine"
}' 'https://docs-examples.firebaseio.com/rest/saving-data/fireblog/posts.json'
密钥在发布的数据中提供。是否可以只发布一个值列表并让 firebase 自动生成密钥,类似于下面的 javascript 示例?
var postsRef = ref.child("posts");
postsRef.push({
author: "gracehop",
title: "Announcing COBOL, a New Programming Language"
});
postsRef.push({
author: "alanisawesome",
title: "The Turing Machine"
});