Add support for shallow reads from the the realtime database.
The Python SDK support it: https://github.com/firebase/firebase-admin-python/pull/109
The Rest API support it: https://firebase.google.com/docs/reference/rest/database/#section-param-shallow
Shallow reads cannot be supported in SDK implementations based on the WebSocket interface of RTDB. Python and Go support it since they are based on the REST interface.
Doesn't look like a good reason to me 馃槖
I found this based on hiranya's answer. Hopefully it works out for some people:
import request from 'request';
request({ url: "https://[YOUR-APP-ID].firebaseio.com/path/to/data/.json?shallow=true" }, (error, response, body) => {
const shallowData = JSON.parse(body);
console.log(shallowData);
});
Reference: https://firebase.google.com/docs/database/rest/retrieve-data#shallow
Most helpful comment
I found this based on hiranya's answer. Hopefully it works out for some people:
Reference: https://firebase.google.com/docs/database/rest/retrieve-data#shallow