Added support for Firebase Storage & Firebase Functions#38
Open
wkok wants to merge 23 commits intodeg:masterfrom
Open
Added support for Firebase Storage & Firebase Functions#38wkok wants to merge 23 commits intodeg:masterfrom
wkok wants to merge 23 commits intodeg:masterfrom
Conversation
|
What a synchronicity, i was searching for |
add support for firebase sdk v9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thank you for this library, I find it extremely useful.
Currently you have wrappers for Firebase Authentication, Realtime Database & FireStore
I thought it useful to include basic operations of Firebase Storage and Firebase Functions submitted via this Pull Request.
Storage
re-frame effects are implemented for basic Storage functions put, delete & download-url
Put
Puts a collection of File objects into a Firebase Storage bucket.
See: https://firebase.google.com/docs/storage/web/upload-files
Required arguments :path :file
Example FX:
{:storage/put [{:path "path/to/object" :file File :metadata {:customMetadata {"some-key" "some-value"}} :on-progress #(.log js/console (str "Upload is " % "% complete.")) :on-success #(js/alert "Success!") :on-error #(js/alert "Error: " %)}]}Delete
Deletes a collection of object paths/keys from a Firebase Storage bucket.
See: https://firebase.google.com/docs/storage/web/delete-files
Required arguments :path
Example FX:
{:storage/delete [{:path "path/to/object" :on-success #(js/alert "Success!") :on-error #(js/alert "Error: " %)}]}Download URL
Generates a url with which the browser can download an object from Firebase Storage
See: https://firebase.google.com/docs/storage/web/download-files
Required arguments: :path
Example FX:
{:storage/download-url {:path "path/to/object" :on-success #(js/window.open %) :on-error #(js/alert "Error: " %)}}Functions
re-frame effects are implemented for basic Functions of call
Call
Executes a Callable Firebase Cloud Function
See: https://firebase.google.com/docs/functions/callable
Required arguments: :cfn-name :data
Example FX:
{:functions/call {:cfn-name "my-function-name" :data {:foo "bar"} :on-success #(js/alert (:foobar %)) :on-error #(js/alert "Error: " %)}}