This file contains 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
//this methid calls the firebase function by its name , and passes the parameter using Map, the parameters are email and role. | |
private Task<String> addRole() { | |
// Create the arguments to the callable function. | |
Map<String, Object> data = new HashMap<>(); | |
data.put("email", email); | |
data.put("push", true); | |
data.put("role",role); | |
return mFunctions | |
.getHttpsCallable("addRole") |
This file contains 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
import * as functions from 'firebase-functions' | |
import * as _ from 'lodash' | |
import { google } from 'googleapis' | |
const sheets = google.sheets('v4') | |
import * as admin from 'firebase-admin'; | |
admin.initializeApp(); | |
const spreadsheetId = '' // Your Sheets ID |