Google is committed to advancing racial equity for Black communities. See how.

FirebaseFunctions

public class FirebaseFunctions extends Object

FirebaseFunctions lets you call Cloud Functions for Firebase.

Public Method Summary

HttpsCallableReference
getHttpsCallable(String name)
Returns a reference to the Callable HTTPS trigger with the given name.
static FirebaseFunctions
getInstance(String region)
Creates a Cloud Functions client with the default app and given region.
static FirebaseFunctions
getInstance()
Creates a Cloud Functions client with the default app.
static FirebaseFunctions
getInstance(FirebaseApp app, String region)
Creates a Cloud Functions client with the given app and region.
static FirebaseFunctions
getInstance(FirebaseApp app)
Creates a Cloud Functions client with the given app.
void
useEmulator(String host, int port)
Modify this FirebaseFunctions instance to communicate with the Cloud Functions emulator.
void
useFunctionsEmulator(String origin)
This method was deprecated. see useEmulator(String, int)

Inherited Method Summary

Public Methods

public HttpsCallableReference getHttpsCallable (String name)

Returns a reference to the Callable HTTPS trigger with the given name.

public static FirebaseFunctions getInstance (String region)

Creates a Cloud Functions client with the default app and given region.

Parameters
region The region for the HTTPS trigger, such as "us-central1".

public static FirebaseFunctions getInstance ()

Creates a Cloud Functions client with the default app.

public static FirebaseFunctions getInstance (FirebaseApp app, String region)

Creates a Cloud Functions client with the given app and region.

Parameters
app The app for the Firebase project.
region The region for the HTTPS trigger, such as "us-central1".

public static FirebaseFunctions getInstance (FirebaseApp app)

Creates a Cloud Functions client with the given app.

Parameters
app The app for the Firebase project.

public void useEmulator (String host, int port)

Modify this FirebaseFunctions instance to communicate with the Cloud Functions emulator.

Note: this must be called before this instance has been used to do any operations.

Parameters
host the emulator host (ex: 10.0.2.2)
port the emulator port (ex: 5001)

public void useFunctionsEmulator (String origin)

This method was deprecated.
see useEmulator(String, int)