Firebase (scottrules44 plugin) - Retrieve all users with given key

Hey,

I’m trying to get a list of usernames based on some keys. For example, the user has a value called “location” or “name”. Could I, with the plugin provided by scott, get the names of all the users that have the same value for a given location or name? I couldn’t find a function in the docs that would fit my needs for this. Any thoughts? Should I just use the REST Api instead?

Kind regards

Bram

You should be able to make a database to store different values including location data and name.You are response for doing this your self because firebase does not provide an api for this.

Hi Scott,

thanks for the fast reply. But what if I included the variables and have 5 users with the name “Bob”. Then how would I search through those 5 users with the name “Bob”. Could I pass some sort of query for this?

No you would have to requests the data from a database and sort through the lua table your self

Okay cool, one more question :slight_smile:
Would it be possible to do such thing without having to download the complete json file?

It might be possible, I don’t know. I mean just because I made a plugin does not mean I know everything about firebase. The plugin is open sourced so you can try to do it yourself. If you do find out how you should share. https://github.com/scottrules44/firebase-plugin-source

Cool Scott, wasn’t sure if that was the most up to date version. I’ll definitely give it a try and will share it :slight_smile: