Rhino Grasshopper's RESTful interface for Google Firebase
Firehopper is a Grasshopper add-in that interacts with Google Firebase in RESTful ways. User can simply request a PUT to store JSON style data in Google Firebase, PATCH to modify, POST to incrementally save data, DELETE to delete, and reqeust GET to fetch the data. This component will be updated further to support different functionality supported by Google Firebase.
Visit http://firebase.google.com to create an account and to create new project.
After creating the account and the project, you can get the following information from 'Project Overview' section in the Firebase console. We need 'apiKey' and 'databaseURL' values.
Download firehopper.gha in the 'Release' tab in this github repo or at food4rhino(http://www.food4rhino.com/app/firehopper) and save under the Grasshopper library folder.
The key-value pair generator combines two sets of strings into JSON style string format. The component will throw an error when two lists contain different amount of string elements inside.
The PUT component triggers PUT request to Firebase to store the JSON string. This component requires 'apiKey' and 'databaseURL' information retrieved from the 'Setup' section in this page. Basic usage of the PUT component is illustrated on below images:
After triggering the PUT component, the component will send the JSON string to corresponding Firebase database using the API key and Database URL. The result of above example is shown below:
The PUT component can be used with the firehopper Key-Value Generator as well.
The result of above example is shown below:
The GET component triggers GET request to Firebase to fetch the JSON string. This component requires 'apiKey' and 'databaseURL' information retrieved from the 'Setup' section in this page. Basic usage of the GET component is illustrated on below images:
JSON string retrieved from firehopper GET component can be further queried with ghJSON(https://mathrioshka.ru/ghjson/) as below example:
Will be updated soon.
Will be updated soon.
Will be updated soon.
- Microsoft Visual Studio Community 2017 Version 15.5.0
- Rhino Version 5 SR14 64-bit
- Grasshopper Build 0.9.0076
- Grasshopper.dll (v4.0.30319)
- System.Net.Http.dll (v4.0.30319)
Hojoong Chung https://github.com/hodgoong http://hojoongchung.blogspot.com hojoong.chung(at)gmail.com
firehopper © 2018 Hojoong Chung