Is there a non-mini version of JavaScript for the FireBase API?

I am working on an interface for a device that provides an API through FireBase, but I am not working in Java, JavaScript, or any other language. FireBase provides libraries for.

I use Lua, and although I can easily implement the REST API, I would like to be able to use the WebSocket API, as firebase.js provides.

I can create a connection to WebSocket, but I don’t know how the authorization function in firebase.js works, and I wondered if there is a “non-minified” version of firebase.js, so I can see how the authentication call works.

+4
source share
2 answers

The protocol that Firebase uses to communicate with its client libraries is not a documented API. You may be able to rebuild it, but since it is not a documented API, it can change at any time.

You might want to explore Firebase REST Streaming , which lets you listen to changes in location. Here is an example of what the server could send, for documents:

// Set your entire cache to {"a": 1, "b": 2} event: put data: {"path": "/", "data": {"a": 1, "b": 2}} // Put the new data in your cache under the key 'c', so that the complete cache now looks like: // {"a": 1, "b": 2, "c": {"foo": true, "bar": false}} event: put data: {"path": "/c", "data": {"foo": true, "bar": false}} 

Also, the Firebase client that @Anant mentions in his comment is an outdated version that is very old.

0
source

Un-minified / un-obfuscated debug versions of version 2.x of the Firebase library are available by adding -debug to the file name on the CDN. For example, debug version v2.4.2 here

This is no longer possible with v3 +; I asked another question about this

Update: the answer seems to be that there is currently no debug version v3 (2016-07-18)

0
source

Source: https://habr.com/ru/post/1500386/


All Articles