•  


GitHub - bane73/firebase4j: Source for the Java interface to the Firebase API
Skip to content

bane73/firebase4j

Folders and files

Name Name
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Firebase4j

++++++++++
UPDATE DECEMBER 2019 -- CAVEAT EMPTOR!
As much as I love seeing people's interest in my project, it is very dated and not well-supported (for lack of time and 
interest); I approve other people's pull-requests to it but otherwise am not really maintaining it much. It was started as
a POC and then one day I woke up and people were just using it (totally fine by me, but buyer-beware and all that). If this
project actually fills a gap that is not provided by the official tooling, then I am totally open to people submitting 
pull-requests for new features and keeping the project going; but when I created this project I wrapped the Firebase REST 
API because they had no official Java support -- however, these days, that is no longer true 
([they do!](
https://firebase.google.com/docs/admin/setup
)).
++++++++++

Note: THIS PROJECT IS STILL IN ALPHA.

UPDATE: if you want to bring this into a Maven-project, Jitpack can dynamically make it 
available to you (I haven't tried this in several years, hopefully it still works):
https://jitpack.io/p/bane73/firebase4j
 

REQUIREMENTS

	In order to use this project, you must first acquire a Firebase workspace-
	url. You can obtain a workspace-url by signing up for early-access to their
	private-beta.
	
	Alternatively, you can run through their tutorial and then use the auto-
	generated workspace-url the tutorial provides you with. This url, however, 
	is transient so don't put any data in there you want to keep around.
	
	You should also review the Firebase documentation and tutorial, as this 
	interface is only meant to provide a thin wrapper around their REST API.
	
	Their REST API documentation can be found at:
		
http://www.firebase.com/docs/rest-api.html

		
	Their tutorial can be found at:
		
http://www.firebase.com/tutorial/

	
	
CURRENT FUNCTIONALITY	

	This project currently supports GET, PUT, POST, and DELETE to perform real-
	time notifications to clients from the back-end.  However, the reverse is 
	not true; so, if a client updates the firebase-data, the back-end will not 
	automatically be aware of it.
	
	You could theoretically implement some sort of polling and delta-parsing on 
	the back-end in order to accomplish this, but this wrapper does not (yet?) 
	take care of that for you.
	
	Of course, if your clients are also subscribing directly to the firebase-
	data, they would naturally be made aware of any changes by another client 
	since this is existing native behavior of the Firebase API.
	
	
"LOOK, MA, NO HANDS!" (but they aren't tied either!)

	The goal of this project is to do all of the mundane-lifting for you, but 
	efforts have been made to do this in a flexible enough way that it doesn't 
	limit you too much either.  
	
	So, this project allows you to interact with the firebase exclusively using 
	Map<String, Object>.
	
	However, should you need or want to, you can opt to both provide your own 
	JSON as well as work directly with the JSON returned by the firebase.
	
	Hopefully I have achieved the best balance between ease-of-use and 
	flexibility; please feel free to contact me with your input if you think I 
	can do a better job of achieving that goal.
	
	
EXAMPLE (for more example-code, refer to the Demo.java file)

	// create the firebase
	Firebase firebase = new Firebase( your_firebase_workspace_url );

	// exclude .json extension if it's not needed (ie, working with Firebase Authentication REST API)
	Firebase firebase = new Firebase( your_firebase_workspace_url, false );

	// PUT a map of some data into the firebase
	Map<String, Object> dataMap = new LinkedHashMap<String, Object>();
	dataMap.put( "PUT", "This was PUT into your workspace root" );
	response = firebase.put( dataMap );
	
	// GET the map back out of the firebase
	response = firebase.get();
	System.out.println( response );
	
	// alternatively, you can get a few details about the response
	response.getSuccess(); 	// true/false if method finished successfully
	response.getCode(); 	// http-code of method-request
	response.getBody();	// a map of the data returned
	response.getRawBody();	// the data returned in it's raw-form (ie: JSON)
	
	// another alternative, you can PUT/POST your own JSON if you want
	response = firebase.put( "PUT2", "{ 'key': 'Some value' }" );
	

BUGS

	Please submit all bugs to: 
https://github.com/bane73/firebase4j/issues

	
	
COPYRIGHT

	Copyright (c) 2012 by Brandon Gresham.  See LICENSE.txt for details.
	
	

About

Source for the Java interface to the Firebase API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

- "漢字路" 한글한자자동변환 서비스는 교육부 고전문헌국역지원사업의 지원으로 구축되었습니다.
- "漢字路" 한글한자자동변환 서비스는 전통문화연구회 "울산대학교한국어처리연구실 옥철영(IT융합전공)교수팀"에서 개발한 한글한자자동변환기를 바탕하여 지속적으로 공동 연구 개발하고 있는 서비스입니다.
- 현재 고유명사(인명, 지명등)을 비롯한 여러 변환오류가 있으며 이를 해결하고자 많은 연구 개발을 진행하고자 하고 있습니다. 이를 인지하시고 다른 곳에서 인용시 한자 변환 결과를 한번 더 검토하시고 사용해 주시기 바랍니다.
- 변환오류 및 건의,문의사항은 juntong@juntong.or.kr로 메일로 보내주시면 감사하겠습니다. .
Copyright ⓒ 2020 By '전통문화연구회(傳統文化硏究會)' All Rights reserved.
 한국   대만   중국   일본