FirebaseFunctions
public final class FirebaseFunctions
FirebaseFunctions lets you call Cloud Functions for Firebase.
Summary
Nested types |
|---|
public static class FirebaseFunctions.Companion |
Public methods |
|
|---|---|
final @NonNull HttpsCallableReference |
getHttpsCallable(@NonNull String name)Returns a reference to the callable HTTPS trigger with the given name. |
final @NonNull HttpsCallableReference |
getHttpsCallable(Returns a reference to the callable HTTPS trigger with the given name and call options. |
final @NonNull HttpsCallableReference |
Returns a reference to the callable HTTPS trigger with the provided URL. |
final @NonNull HttpsCallableReference |
getHttpsCallableFromUrl(Returns a reference to the callable HTTPS trigger with the provided URL and call options. |
static final @NonNull FirebaseFunctions |
Creates a Cloud Functions client with the default app. |
static final @NonNull FirebaseFunctions |
getInstance(@NonNull FirebaseApp app)Creates a Cloud Functions client with the given app. |
static final @NonNull FirebaseFunctions |
getInstance(@NonNull String regionOrCustomDomain)Creates a Cloud Functions client with the default app and given region or custom domain. |
static final @NonNull FirebaseFunctions |
getInstance(@NonNull FirebaseApp app, @NonNull String regionOrCustomDomain)Creates a Cloud Functions client with the given app and region or custom domain. |
final void |
useEmulator(@NonNull String host, int port)Modifies this FirebaseFunctions instance to communicate with the Cloud Functions emulator. |
final void |
This method is deprecated. Use useEmulator to connect to the emulator. |
Extension functions |
|
|---|---|
final @NonNull HttpsCallableReference |
FunctionsKt.getHttpsCallable(Returns a reference to the Callable HTTPS trigger with the given name and call options. |
final @NonNull HttpsCallableReference |
FunctionsKt.getHttpsCallableFromUrl(Returns a reference to the Callable HTTPS trigger with the given URL and call options. |
Public methods
getHttpsCallable
public final @NonNull HttpsCallableReference getHttpsCallable(@NonNull String name)
Returns a reference to the callable HTTPS trigger with the given name.
getHttpsCallable
public final @NonNull HttpsCallableReference getHttpsCallable(
@NonNull String name,
@NonNull HttpsCallableOptions options
)
Returns a reference to the callable HTTPS trigger with the given name and call options.
getHttpsCallableFromUrl
public final @NonNull HttpsCallableReference getHttpsCallableFromUrl(@NonNull URL url)
Returns a reference to the callable HTTPS trigger with the provided URL.
getHttpsCallableFromUrl
public final @NonNull HttpsCallableReference getHttpsCallableFromUrl(
@NonNull URL url,
@NonNull HttpsCallableOptions options
)
Returns a reference to the callable HTTPS trigger with the provided URL and call options.
getInstance
public static final @NonNull FirebaseFunctions getInstance()
Creates a Cloud Functions client with the default app.
getInstance
public static final @NonNull FirebaseFunctions getInstance(@NonNull FirebaseApp app)
Creates a Cloud Functions client with the given app.
| Parameters | |
|---|---|
@NonNull FirebaseApp app |
The app for the Firebase project. |
getInstance
public static final @NonNull FirebaseFunctions getInstance(@NonNull String regionOrCustomDomain)
Creates a Cloud Functions client with the default app and given region or custom domain.
getInstance
public static final @NonNull FirebaseFunctions getInstance(@NonNull FirebaseApp app, @NonNull String regionOrCustomDomain)
Creates a Cloud Functions client with the given app and region or custom domain.
| Parameters | |
|---|---|
@NonNull FirebaseApp app |
The app for the Firebase project. |
@NonNull String regionOrCustomDomain |
The region or custom domain for the HTTPS trigger, such as |
useEmulator
public final void useEmulator(@NonNull String host, int port)
Modifies this FirebaseFunctions instance to communicate with the Cloud Functions emulator.
Note: Call this method before using the instance to do any functions operations.
Extension functions
FunctionsKt.getHttpsCallable
public final @NonNull HttpsCallableReference FunctionsKt.getHttpsCallable(
@NonNull FirebaseFunctions receiver,
@NonNull String name,
@ExtensionFunctionType @NonNull Function1<@NonNull HttpsCallableOptions.Builder, Unit> init
)
Returns a reference to the Callable HTTPS trigger with the given name and call options.
FunctionsKt.getHttpsCallableFromUrl
public final @NonNull HttpsCallableReference FunctionsKt.getHttpsCallableFromUrl(
@NonNull FirebaseFunctions receiver,
@NonNull URL url,
@ExtensionFunctionType @NonNull Function1<@NonNull HttpsCallableOptions.Builder, Unit> init
)
Returns a reference to the Callable HTTPS trigger with the given URL and call options.