Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firebase4 eiffel #2

Open
wants to merge 42 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
22a5938
First commit.
json-lim Jan 19, 2016
76a86be
Committing current progress.
json-lim Jan 19, 2016
dc5a865
Adding gitignore file.
json-lim Jan 19, 2016
2d0820f
Remove EIFGENs folder.
json-lim Jan 19, 2016
3ab4845
Replaced 'in-development' firebase_api with original working firebase…
json-lim Jan 19, 2016
b7a6d78
Updated .gitignore file.
json-lim Jan 19, 2016
42ffde7
Updated .gitignore file correctly.
json-lim Jan 19, 2016
5bbdd60
Implemented draft set_print_format feature.
json-lim Jan 19, 2016
7f38eb4
Merge branch 'printFeature' into dev
json-lim Jan 19, 2016
05442f3
Minor refactoring.
json-lim Jan 19, 2016
1e5b2ca
Implemented feature that allows user to set a shallow query string. T…
json-lim Jan 19, 2016
02e670b
firebase_api now handles multiple queries and can set format response…
json-lim Jan 20, 2016
da04034
Refactored code.
json-lim Jan 20, 2016
eb7f7bc
Implemented post-condition for print feature.
json-lim Jan 21, 2016
fe85663
Commit for immediate merge.
json-lim Jan 21, 2016
106a00e
Fixed up mistakes from old commits. Re-added application.e and fireba…
json-lim Jan 21, 2016
c8115e4
Refactoring.
json-lim Jan 21, 2016
e9aa1fb
Implemented orderBy and startAt query feature.
json-lim Jan 22, 2016
f8c9b71
Implemented endAt query feature and a helper feature.
json-lim Jan 22, 2016
70ca554
Added postcondition for set_format_response feature.
json-lim Jan 22, 2016
9072c10
Implemented a get-priority feature.
json-lim Jan 25, 2016
15661dc
Implemented retrieve_rules and update_rules features.
json-lim Jan 25, 2016
753f704
Changed methods with detachable BOOLEAN parameters to use just BOOLEA…
json-lim Jan 25, 2016
8c5a9b2
Redid the get_priority feature.
json-lim Jan 25, 2016
de277fe
Implemented helped function that cleared all query settings.
json-lim Jan 25, 2016
c637ed5
Improved set_limit_to_first_value and set_limit_to_last_value features.
json-lim Jan 25, 2016
ddb5f7e
Refactored code, added postconditions, included documentation.
json-lim Jan 25, 2016
b5b5044
Added more documentation and refactored code.
json-lim Jan 25, 2016
b3fcba5
Update documentation.
json-lim Jan 25, 2016
a94ebab
Merge branch 'dev' of https://github.com/blank23/firebase4Eiffel into…
jvelilla Jan 26, 2016
0ba9abc
Added template TEST_REST_API
jvelilla Jan 26, 2016
7da9ee9
Merge branch 'jvelilla-firebase_Rev' into dev
json-lim Jan 26, 2016
6b78a39
Added download feature, modified get_priority, retrieve_rules and upd…
json-lim Jan 30, 2016
59212e9
Fixed conflicts.
json-lim Jan 30, 2016
1066e39
Started implementing tests for firebase_api.
json-lim Jan 30, 2016
5170b11
Implementing test cases in application.e and test_rest_api.e. Also mo…
json-lim Feb 3, 2016
24d77a6
Completed documentation. Finalised test files. Added comments to fire…
json-lim Feb 5, 2016
7dd5b91
Removed old READMEs.
json-lim Feb 5, 2016
837a575
Add new README.
json-lim Feb 5, 2016
dc64e3c
Removed a print statement
json-lim Feb 5, 2016
b23efe7
Edited the README.md file. Also included a folder titled 'other' cont…
json-lim Feb 5, 2016
b306e0a
Updated links of result screenshots. Instead of using screenshots fro…
json-lim Feb 5, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Directories and patterns to ignore.
EIFGENs
.git
.svn/
*.swp
*~
Expand Down
128 changes: 128 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
Firebase REST API. Eiffel Client
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General comment: try to add style to the Readme file, because at the moment is not easy to read.
Markdown syntax: https://daringfireball.net/projects/markdown/syntax
Online editors http://dillinger.io/, https://stackedit.io/


Based on Firebase REST API: https://www.firebase.com/docs/rest/api/

Documentation for REST API Development
The aim of this project is to develop as many features as possible from the Firebase REST API documentation. This README will be divided into 4 sections:
Outline of all Features - Outlines all features list in the documentation in 2015
Developed Features - Description of the feature and how to use it.
Partially-Developed Features - Description of the feature, reasons for its partial-development and how to use it.
Undeveloped Features - Description of the feature and reasons for why its lack of development.
Future Development - Ideas of what a future release could include.


Outline of all Features
API Usage
Get (Already Developed)
Put (Already Developed)
Post (Already Developed)
Patch (Already Developed)
Delete (Already Developed)
Method Override???
Query
Auth (Already Developed)
Shallow (Developed)
Print Format (Developed)
Callback (Undeveloped)
Format (Developed)
Download (Developed)
OrderBy (Developed)
StartAt/EndAt/EqualTo (Developed)
LimitToFirst/LimitTolast (Developed)
Stream (Developed)
Priorities (Partially-Developed)
Server Values (Undeveloped)
Security and Rules (Developed)

Developed Features
The following features have been fully developed. All features have been implemented in the firebase_api class.

Query: Auth
Supported by all request types.

Authenticates this request to allow access to data protected by Security and Firebase Rules. The argument can either be your Firebase app’s secret or an authentication token.

The user sets their authentication when creating a new firebase_api object with the following feature.

make_with_auth (a_base_uri: READABLE_STRING_8; a_auth: READABLE_STRING_8)

a_base_uri is the URI of the user’s database while a_auth is the authentication token. Here is an example.

make_with_auth("https://fiery-fire-4173.firebaseio.com", "33ZXLlDjqpdLzb6DiAi17KkAA6qvzkF40M3MKxWL")


Query: Shallow
Supported by GET.

This is an advanced feature, designed to help you work with large datasets without needing to download everything. Set this to true to limit the depth of the data returned at a location. If the data at the location is a JSON primitive (string, number or boolean), its value will simply be returned. If the data snapshot at the location is a JSON object, the values for each key will be truncated to true.

The shallow query can be used with the following feature.

set_shallow(option: BOOLEAN)

To set shallow, the user should utilise

set_shallow(TRUE).

To unset shallow, the user should

utilise set_shallow(FALSE).

By default, shallow is unset.


Note: shallow cannot be mixed with other query parameters according to the documentation. However, it was discovered when testing that shallow could be combined with auth and print format.



Query: Print Format



FirebaseApi.printFormat(“pretty”)



Query: Format

Query: Download

Query: Order by

Query: Start at, End at, Equal to

Query: Limit to First, Limit to Last

Stream

Security and Rules


Partially-Developed Features

Priorities




Incomplete Features
The following features have not been implemented.

Query: Callback

This feature is a JavaScript only feature which is why it was not implemented.

Server Values

By its nature, this feature does not require much work from the user to utilise. As referenced in documentation, the server value can be used




Future Development

High Level Abstraction
Ensure that query strings are used by the right REST methods


JSON Value Constructor
124 changes: 124 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,127 @@ Firebase REST API. Eiffel Client

Based on Firebase REST API: https://www.firebase.com/docs/rest/api/

Documentation for REST API Development
The aim of this project is to develop as many features as possible from the Firebase REST API documentation. This README will be divided into 4 sections:
Outline of all Features - Outlines all features list in the documentation in 2015
Developed Features - Description of the feature and how to use it.
Partially-Developed Features - Description of the feature, reasons for its partial-development and how to use it.
Undeveloped Features - Description of the feature and reasons for why its lack of development.
Future Development - Ideas of what a future release could include.


Outline of all Features
API Usage
Get (Already Developed)
Put (Already Developed)
Post (Already Developed)
Patch (Already Developed)
Delete (Already Developed)
Method Override???
Query
Auth (Already Developed)
Shallow (Developed)
Print Format (Developed)
Callback (Undeveloped)
Format (Developed)
Download (Developed)
OrderBy (Developed)
StartAt/EndAt/EqualTo (Developed)
LimitToFirst/LimitTolast (Developed)
Stream (Developed)
Priorities (Partially-Developed)
Server Values (Undeveloped)
Security and Rules (Developed)

Developed Features
The following features have been fully developed. All features have been implemented in the firebase_api class.

Query: Auth
Supported by all request types.

Authenticates this request to allow access to data protected by Security and Firebase Rules. The argument can either be your Firebase app’s secret or an authentication token.

The user sets their authentication when creating a new firebase_api object with the following feature.

make_with_auth (a_base_uri: READABLE_STRING_8; a_auth: READABLE_STRING_8)

a_base_uri is the URI of the user’s database while a_auth is the authentication token. Here is an example.

make_with_auth("https://fiery-fire-4173.firebaseio.com", "33ZXLlDjqpdLzb6DiAi17KkAA6qvzkF40M3MKxWL")


Query: Shallow
Supported by GET.

This is an advanced feature, designed to help you work with large datasets without needing to download everything. Set this to true to limit the depth of the data returned at a location. If the data at the location is a JSON primitive (string, number or boolean), its value will simply be returned. If the data snapshot at the location is a JSON object, the values for each key will be truncated to true.

The shallow query can be used with the following feature.

set_shallow(option: BOOLEAN)

To set shallow, the user should utilise

set_shallow(TRUE).

To unset shallow, the user should

utilise set_shallow(FALSE).

By default, shallow is unset.


Note: shallow cannot be mixed with other query parameters according to the documentation. However, it was discovered when testing that shallow could be combined with auth and print format.



Query: Print Format



FirebaseApi.printFormat(“pretty”)



Query: Format

Query: Download

Query: Order by

Query: Start at, End at, Equal to

Query: Limit to First, Limit to Last

Stream

Security and Rules


Partially-Developed Features

Priorities




Incomplete Features
The following features have not been implemented.

Query: Callback

This feature is a JavaScript only feature which is why it was not implemented.

Server Values

By its nature, this feature does not require much work from the user to utilise. As referenced in documentation, the server value can be used




Future Development

High Level Abstraction
Ensure that query strings are used by the right REST methods


JSON Value Constructor
Loading