Code Monkey home page Code Monkey logo

firehopper's Introduction

firehopper

Platforms License Join the chat at https://gitter.im/hodgoong/firehopper

firehopper_logo 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.

How to use

firehopper_components

Setup

Create Google Firebase account for free

Visit http://firebase.google.com to create an account and to create new project.

Retrieve DB URL and API Key

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. firehopper_firebase_setup

Download Firehopper

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.

Data

firehopper Key-Value Pair Generator

firehopper_key-value pair generator

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. firehopper_key-value pair generator example

HTTP

firehopper PUT

firehopper_PUT_component

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: firehopper_PUT example

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: firehopper_PUT example_result

firehopper PUT with Key-Value Generator

The PUT component can be used with the firehopper Key-Value Generator as well. firehopper_PUT example

The result of above example is shown below: firehopper_PUT example_result

firehopper GET

firehopper_GET_component

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: firehopper_PUT example

Query using ghJSON

JSON string retrieved from firehopper GET component can be further queried with ghJSON(https://mathrioshka.ru/ghjson/) as below example: firehopper_GET_component

firehopper POST

firehopper_GET_component

Will be updated soon.

firehopper PATCH

firehopper_GET_component

Will be updated soon.

firehopper DELETE

firehopper_GET_component

Will be updated soon.

Usage Example with Geometry Parameter

firehopper_GET_component

Development Environment:

  • Microsoft Visual Studio Community 2017 Version 15.5.0
  • Rhino Version 5 SR14 64-bit
  • Grasshopper Build 0.9.0076

Dependancies (run-time version):

  • Grasshopper.dll (v4.0.30319)
  • System.Net.Http.dll (v4.0.30319)

Author

Hojoong Chung https://github.com/hodgoong http://hojoongchung.blogspot.com hojoong.chung(at)gmail.com

firehopper © 2018 Hojoong Chung

firehopper's People

Contributors

hodgoong avatar gitter-badger avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.