{"id":7553003,"url":"https://github.com/alborghetti/ABAPFire","last_synced_at":"2025-05-14T13:31:36.424Z","repository":{"id":232107756,"uuid":"100637115","full_name":"alborghetti/ABAPFire","owner":"alborghetti","description":"ABAP Firebase Client","archived":false,"fork":false,"pushed_at":"2018-11-22T08:33:41.000Z","size":76,"stargazers_count":10,"open_issues_count":1,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-19T04:44:01.984Z","etag":null,"topics":["abap","abapgit","firebase","firebase-auth","firebase-database","sap"],"latest_commit_sha":null,"homepage":"http://alborghetti.github.io/ABAPFire/","language":"ABAP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alborghetti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-17T19:15:22.000Z","updated_at":"2021-01-11T19:10:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"47c4f0b3-6af1-42a2-902b-6621a95a4dbf","html_url":"https://github.com/alborghetti/ABAPFire","commit_stats":null,"previous_names":["alborghetti/abapfire"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alborghetti%2FABAPFire","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alborghetti%2FABAPFire/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alborghetti%2FABAPFire/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alborghetti%2FABAPFire/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alborghetti","download_url":"https://codeload.github.com/alborghetti/ABAPFire/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254150463,"owners_count":22022960,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["abap","abapgit","firebase","firebase-auth","firebase-database","sap"],"created_at":"2024-04-08T01:17:50.328Z","updated_at":"2025-05-14T13:31:36.408Z","avatar_url":"https://github.com/alborghetti.png","language":"ABAP","funding_links":[],"categories":["Categories"],"sub_categories":["🖇️ Integration"],"readme":"![Tested SAP release: ABAP 740 SP9](https://img.shields.io/badge/ABAP-740%20SP9-green.svg?style=flat)\n\n# ABAPFire #\nABAP Firebase REST API Helper Library\n\n## Installation ##\n\n### Clone it using abapGit ##\n\nInstall [abapGit](http://larshp.github.io/abapGit/guide-install.html), then clone the repository in a package (e.g. $ABAPFIRE).\n\n### Install Google certificate ###\n\nInstall Root CA from [Google Internet Authority G2](https://pki.google.com/) using transaction STRUST in SSL identity ANONYMOUS.\n\n## Usage ##\n\nProgram [ZABAPFIRE_DEMO](src/zabapfire_demo.prog.abap) provides usage examples.\n\n### Initialize the Application ###\n\nTo initialize the library, just pass to it your firebase configuration:\n\n```abap\nDATA:\n  firebase     TYPE REF TO zabapfire_cl_firebase,\n  ls_config    TYPE zabapfire_cl_firebase=\u003ety_firebase_config.\n  \n  ls_config-apikey = '[your apikey]'.\n  ls_config-authdomain = '[your authdomain]'.\n  ls_config-databaseurl = '[your databaseurl]'.\n  ls_config-messagingsenderid = '[your messagingsenderid]'.\n  ls_config-projectid = '[your projectid]'.\n  ls_config-storagebucket = '[your storagebucket]'.\n\n  firebase = zabapfire_cl_firebase=\u003einitialize_app( ls_config ).\n``` \n  \n### User Authentication ###\n  \nThe library support only email and password authentication:\n  \n```abap\nTRY.\n      firebase-\u003eauth-\u003eauthenticate_with_email(\n        EXPORTING\n        email = p_email\n        password = p_pass ).\n    CATCH zcx_abapfire_firebase INTO lcx_firebase.\n      WRITE lcx_firebase-\u003eget_text( ).\n\n  ENDTRY.\n```\n\n### Retrieve firebase data ###\n\n```abap\nTRY.\n    ls_parameters-order_by = 'carrid'.\n    ls_parameters-equal_to = 'AC'.\n    firebase-\u003edb-\u003eget(\n        EXPORTING\n        path =  p_path\n        parameters = ls_parameters\n        IMPORTING\n        child = lt_abap ).\n  CATCH zcx_abapfire_firebase INTO lcx_firebase.\n    MESSAGE i000(zabapfire_msg) WITH lcx_firebase-\u003eget_text( )\n      DISPLAY LIKE 'E'.\n    EXIT.\nENDTRY.\n\n```\n\nIf your target ABAP structure contains a column with name $KEY, firebase generated unique keys are saved in this column:\n\n```abap\n TYPES:\n      BEGIN OF ty_abap,\n        $key        TYPE string.\n          INCLUDE STRUCTURE sflight.\n  TYPES:\n     END OF ty_abap\n```\n![retrieve firebase keys](/docs/img/retrieve_keys.JPG)\n\nFor data retrieving, following query parameters are supported:\n* **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.\n* **orderBy**: Set a sequence order that can be used to filter the data in combination with startAt endAt and equalTo parameters.\n* **startAt**: Set an arbitrary starting point.\n* **endAt**: Set an arbitrary ending point.\n* **equalTo**: Filter on specific value.\n* **limitToFirst**: Set a maximum number of children for which to receive data.\n* **limitToLast**: Set a maximum number of children for which to receive data in reverse order.\n\nRefer to official [firebase documentation](https://firebase.google.com/docs/database/rest/retrieve-data) for more info.\n\n### Save data to firebase ###\n\n#### Set ####\n\nWrites data to firebase Database location.\nThis will overwrite any data at this location and all child locations.\n\n```abap\nSELECT * FROM sflight\nINTO CORRESPONDING FIELDS OF TABLE lt_abap.\nTRY.\n    firebase-\u003edb-\u003eset(\n      EXPORTING\n        path =  p_path\n        child = lt_abap ).\n  CATCH zcx_abapfire_firebase INTO lcx_firebase.\n    MESSAGE i000(zabapfire_msg) WITH lcx_firebase-\u003eget_text( )\n      DISPLAY LIKE 'E'.\n    EXIT.\nENDTRY.\n```\n\n#### Update ####\n\nAs 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).\n\n\n```abap\nTRY.\n    firebase-\u003edb-\u003eupdate(\n      EXPORTING\n        path =  p_path\n        child = lt_abap ).\n  CATCH zcx_abapfire_firebase INTO lcx_firebase.\n    MESSAGE i000(zabapfire_msg) WITH lcx_firebase-\u003eget_text( )\n      DISPLAY LIKE 'E'.\n    EXIT.\nENDTRY.\n```\n\n#### Push ####\n\nGenerates a new child location using a unique key and return the generated unique key.\n\n```abap\nTRY.\n    LOOP AT lt_abap ASSIGNING \u003cls_abap\u003e.\n      \u003cls_abap\u003e-$key = firebase-\u003edb-\u003epush(\n         EXPORTING\n           path =  p_path\n           child = \u003cls_abap\u003e ).\n    ENDLOOP.\n  CATCH zcx_abapfire_firebase INTO lcx_firebase.\n    MESSAGE i000(zabapfire_msg) WITH lcx_firebase-\u003eget_text( )\n      DISPLAY LIKE 'E'.\n    EXIT.\nENDTRY.\n```\n\n#### Remove ####\n\nRemoves the data at this firebase Database location.\n\n```abap\nTRY.\n    firebase-\u003edb-\u003eremove(\n      EXPORTING\n        path =  p_path ).\n  CATCH zcx_abapfire_firebase INTO lcx_firebase.\n    MESSAGE i000(zabapfire_msg) WITH lcx_firebase-\u003eget_text( )\n      DISPLAY LIKE 'E'.\n    EXIT.\nENDTRY.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falborghetti%2FABAPFire","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falborghetti%2FABAPFire","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falborghetti%2FABAPFire/lists"}