Introduction
I will briefly explain how to use Firebase methods.
https://firebase.google.com/docs/reference/rest/database
Basically implemented based on this API document.
Features
Get
Set
Push
Update
Remove
setpriority
rename child path
Certificate
Access link firebase settings as below. After that, click button "Generate new private key" to download key
https://console.firebase.google.com/u/0/project/`[your-project]`/settings/serviceaccounts/adminsdk
Edit node, choose Auth Type is JSON Web Token and input client Email and private Key from the file
Usage
- Get method (GET)
If you execute after setting the Child Path, the Child Path data will appear.
- Set method (PUT)
After inputting data such as {"first": "Jack", "last": "Sparrow"}, if there is already data in the specified Child Path, that data will be lost and updated with the input data.
- Push method (POST)
For example, Child Path is a list of users, enter {"user_number": "321", "name": "John"}. When executed, the new user will be added to the user list.
- Update method (PATCH)
Update the existing data with the entered data.
- Remove method (DELETE)
Delete Child Path.
- Set Priority and setwithPrioty methods (PATCH)
This is because the Put method sets the priority for the child path. (Or to get the priority with GET)
- Rename child path