All Projects → alborghetti → Abapfire

alborghetti / Abapfire

Licence: mit
ABAP Firebase Client

Projects that are alternatives of or similar to Abapfire

React Gatsby Firebase Authentication
🐣🔥Starter Project / Boilerplate for Authentication with Firebase and plain React in Gatsby.js
Stars: ✭ 356 (+3136.36%)
Mutual labels:  firebase, firebase-database, firebase-auth
Laravel Firebase
A Laravel package for the Firebase PHP Admin SDK
Stars: ✭ 369 (+3254.55%)
Mutual labels:  firebase, firebase-database, firebase-auth
React Firebase Hooks
React Hooks for Firebase.
Stars: ✭ 2,227 (+20145.45%)
Mutual labels:  firebase, firebase-database, firebase-auth
Firebase Admin Java
Firebase Admin Java SDK
Stars: ✭ 345 (+3036.36%)
Mutual labels:  firebase, firebase-database, firebase-auth
Rxfirebase
Rxjava 2.0 wrapper on Google's Android Firebase library.
Stars: ✭ 509 (+4527.27%)
Mutual labels:  firebase, firebase-database, firebase-auth
Petshop
Pet Shop is an e-commerce application for Android built with Flutter (iOS to come soon).
Stars: ✭ 127 (+1054.55%)
Mutual labels:  firebase, firebase-database, firebase-auth
Internalappstore
📦 Manage your own internal Android App Store.
Stars: ✭ 295 (+2581.82%)
Mutual labels:  firebase, firebase-database, firebase-auth
Firebasecrud
Rich UI and animation flutter app backed by firebase
Stars: ✭ 121 (+1000%)
Mutual labels:  firebase, firebase-database, firebase-auth
Firebase Ios Sdk
Firebase iOS SDK
Stars: ✭ 3,309 (+29981.82%)
Mutual labels:  firebase, firebase-database, firebase-auth
Firebase Kotlin Sdk
A Kotlin-first SDK for Firebase
Stars: ✭ 214 (+1845.45%)
Mutual labels:  firebase, firebase-database, firebase-auth
Firebase Js Sdk
Firebase Javascript SDK
Stars: ✭ 3,844 (+34845.45%)
Mutual labels:  firebase, firebase-database, firebase-auth
Vuejs Firebase Shopping Cart
Shopping cart demo using Vuejs and Firebase
Stars: ✭ 274 (+2390.91%)
Mutual labels:  firebase, firebase-database, firebase-auth
Firebase Mock
Firebase mock library for writing unit tests
Stars: ✭ 319 (+2800%)
Mutual labels:  firebase, firebase-database, firebase-auth
Mechahamster
Mecha Hamster is a game where you roll through customizable environments that you can share with your friends.
Stars: ✭ 314 (+2754.55%)
Mutual labels:  firebase, firebase-database, firebase-auth
Quickstart Cpp
Firebase Quickstart Samples for C++
Stars: ✭ 123 (+1018.18%)
Mutual labels:  firebase, firebase-database, firebase-auth
Space
A real time chat app for developers built using React, Redux, Electron and Firebase
Stars: ✭ 161 (+1363.64%)
Mutual labels:  firebase, firebase-database, firebase-auth
React Mobx Firebase Authentication
🔥Boilerplate Project for Authentication with Firebase in React and MobX
Stars: ✭ 111 (+909.09%)
Mutual labels:  firebase, firebase-database, firebase-auth
Firebase Php
Unofficial Firebase Admin SDK for PHP
Stars: ✭ 1,657 (+14963.64%)
Mutual labels:  firebase, firebase-database, firebase-auth
React Firebase
🔥Declarative React bindings for Firebase Auth & Realtime Database.
Stars: ✭ 176 (+1500%)
Mutual labels:  firebase, firebase-database, firebase-auth
React Redux Firebase Authentication
🔥Boilerplate Project for Authentication with Firebase in React and Redux
Stars: ✭ 265 (+2309.09%)
Mutual labels:  firebase, firebase-database, firebase-auth

Tested SAP release: ABAP 740 SP9

ABAPFire

ABAP Firebase REST API Helper Library

Installation

Clone it using abapGit

Install abapGit, then clone the repository in a package (e.g. $ABAPFIRE).

Install Google certificate

Install Root CA from Google Internet Authority G2 using transaction STRUST in SSL identity ANONYMOUS.

Usage

Program ZABAPFIRE_DEMO provides usage examples.

Initialize the Application

To initialize the library, just pass to it your firebase configuration:

DATA:
  firebase     TYPE REF TO zabapfire_cl_firebase,
  ls_config    TYPE zabapfire_cl_firebase=>ty_firebase_config.
  
  ls_config-apikey = '[your apikey]'.
  ls_config-authdomain = '[your authdomain]'.
  ls_config-databaseurl = '[your databaseurl]'.
  ls_config-messagingsenderid = '[your messagingsenderid]'.
  ls_config-projectid = '[your projectid]'.
  ls_config-storagebucket = '[your storagebucket]'.

  firebase = zabapfire_cl_firebase=>initialize_app( ls_config ).

User Authentication

The library support only email and password authentication:

TRY.
      firebase->auth->authenticate_with_email(
        EXPORTING
        email = p_email
        password = p_pass ).
    CATCH zcx_abapfire_firebase INTO lcx_firebase.
      WRITE lcx_firebase->get_text( ).

  ENDTRY.

Retrieve firebase data

TRY.
    ls_parameters-order_by = 'carrid'.
    ls_parameters-equal_to = 'AC'.
    firebase->db->get(
        EXPORTING
        path =  p_path
        parameters = ls_parameters
        IMPORTING
        child = lt_abap ).
  CATCH zcx_abapfire_firebase INTO lcx_firebase.
    MESSAGE i000(zabapfire_msg) WITH lcx_firebase->get_text( )
      DISPLAY LIKE 'E'.
    EXIT.
ENDTRY.

If your target ABAP structure contains a column with name $KEY, firebase generated unique keys are saved in this column:

 TYPES:
      BEGIN OF ty_abap,
        $key        TYPE string.
          INCLUDE STRUCTURE sflight.
  TYPES:
     END OF ty_abap

retrieve firebase keys

For data retrieving, following query parameters are supported:

  • shallow: Limit the depth of the data returned. 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.
  • orderBy: Set a sequence order that can be used to filter the data in combination with startAt endAt and equalTo parameters.
  • startAt: Set an arbitrary starting point.
  • endAt: Set an arbitrary ending point.
  • equalTo: Filter on specific value.
  • limitToFirst: Set a maximum number of children for which to receive data.
  • limitToLast: Set a maximum number of children for which to receive data in reverse order.

Refer to official firebase documentation for more info.

Save data to firebase

Set

Writes data to firebase Database location. This will overwrite any data at this location and all child locations.

SELECT * FROM sflight
INTO CORRESPONDING FIELDS OF TABLE lt_abap.
TRY.
    firebase->db->set(
      EXPORTING
        path =  p_path
        child = lt_abap ).
  CATCH zcx_abapfire_firebase INTO lcx_firebase.
    MESSAGE i000(zabapfire_msg) WITH lcx_firebase->get_text( )
      DISPLAY LIKE 'E'.
    EXIT.
ENDTRY.

Update

As opposed to the set( ) method, update( ) can be use to selectively update only the referenced properties at the current location (instead of replacing all the child properties at the current location).

TRY.
    firebase->db->update(
      EXPORTING
        path =  p_path
        child = lt_abap ).
  CATCH zcx_abapfire_firebase INTO lcx_firebase.
    MESSAGE i000(zabapfire_msg) WITH lcx_firebase->get_text( )
      DISPLAY LIKE 'E'.
    EXIT.
ENDTRY.

Push

Generates a new child location using a unique key and return the generated unique key.

TRY.
    LOOP AT lt_abap ASSIGNING <ls_abap>.
      <ls_abap>-$key = firebase->db->push(
         EXPORTING
           path =  p_path
           child = <ls_abap> ).
    ENDLOOP.
  CATCH zcx_abapfire_firebase INTO lcx_firebase.
    MESSAGE i000(zabapfire_msg) WITH lcx_firebase->get_text( )
      DISPLAY LIKE 'E'.
    EXIT.
ENDTRY.

Remove

Removes the data at this firebase Database location.

TRY.
    firebase->db->remove(
      EXPORTING
        path =  p_path ).
  CATCH zcx_abapfire_firebase INTO lcx_firebase.
    MESSAGE i000(zabapfire_msg) WITH lcx_firebase->get_text( )
      DISPLAY LIKE 'E'.
    EXIT.
ENDTRY.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].