GodotNuts / GodotFirebase

Implementations of Firebase for Godot using GDScript
MIT License
554 stars 79 forks source link

added FirestoreCollection internal parsing #78

Closed fenix-hub closed 3 years ago

fenix-hub commented 3 years ago

This PR will integrate automatic parsing/marshalling of FirestoreDocuments in FirestoreCollection functions.

Previously, to call FirestoreCollection management functions such as add(document_name, document) and update(document_name, document) it was necessary to create a FirestoreDocument and call a parsing function dict2fields(dictionary) in order to parse a GDscript Dictionary to a formatted body accepted by Firestore API (which is in the form of {fields: { var_type: {name:value} }}). In the same way, Firebase return bodies needed to be formatted to a Dictionary in order to make them more readable and usable in gdscript using the function fields2dict(document.fields). Firebase GDScript
{fields: {string: {"user":"user_name"}}}|{"user":"user_name"}

This PR will apply the following changes:

timjrobinson commented 3 years ago

@fenix-hub looks like you accidentally committed project.godot changes in this PR. Might want to rotate those keys.

fenix-hub commented 3 years ago

@timjrobinson Thank you for noticing, I'll delete them even though it is not much of a problem for Firebase keys to be exposed.