firebase::functions::Functions

#include <functions.h>

Entry point for the Firebase C++ SDK for CloudFunctions.

Summary

To use the SDK, callfirebase::functions::Functions::GetInstance() to obtain an instance ofFunctions, then useGetHttpsCallable() to obtain references to callable functions. From there you can call them with CallableReference::Call().

Constructors and Destructors

~Functions()
Destructor.

Public functions

GetHttpsCallable(const char *name) const
Get a FunctionsReference for the specified path.
GetHttpsCallableFromURL(const char *url) const
Get a FunctionsReference for the specified URL.
UseFunctionsEmulator(const char *origin)
void
Sets an origin for a CloudFunctions emulator to use.
app()
Get thefirebase::App that thisFunctions was created with.

Public static functions

GetInstance(::firebase::App *app,InitResult *init_result_out)
Get an instance ofFunctions corresponding to the givenApp.
GetInstance(::firebase::App *app, const char *region,InitResult *init_result_out)
Get an instance ofFunctions corresponding to the givenApp.

Public functions

GetHttpsCallable

HttpsCallableReferenceGetHttpsCallable(constchar*name)const

Get a FunctionsReference for the specified path.

GetHttpsCallableFromURL

HttpsCallableReferenceGetHttpsCallableFromURL(constchar*url)const

Get a FunctionsReference for the specified URL.

UseFunctionsEmulator

voidUseFunctionsEmulator(constchar*origin)

Sets an origin for a CloudFunctions emulator to use.

app

::firebase::App*app()

Get thefirebase::App that thisFunctions was created with.

Details
Returns
Thefirebase::App thisFunctions was created with.

~Functions

~Functions()

Destructor.

You may delete an instance ofFunctions when you are finished using it, to shut down theFunctions library.

Public static functions

GetInstance

Functions*GetInstance(::firebase::App*app,InitResult*init_result_out)

Get an instance ofFunctions corresponding to the givenApp.

CloudFunctions usesfirebase::App to communicate with Firebase Authentication to authenticate users to the server backend.

Details
Parameters
app
An instance offirebase::App. CloudFunctions will use this to communicate with Firebase Authentication.
init_result_out
Optional: If provided, write the init result here. Will be set to kInitResultSuccess if initialization succeeded, or kInitResultFailedMissingDependency on Android if Google Play services is not available on the current device.
Returns
An instance ofFunctions corresponding to the givenApp.

GetInstance

Functions*GetInstance(::firebase::App*app,constchar*region,InitResult*init_result_out)

Get an instance ofFunctions corresponding to the givenApp.

CloudFunctions usesfirebase::App to communicate with Firebase Authentication to authenticate users to the server backend.

Details
Parameters
app
An instance offirebase::App. CloudFunctions will use this to communicate with Firebase Authentication.
region
The region to call functions in.
init_result_out
Optional: If provided, write the init result here. Will be set to kInitResultSuccess if initialization succeeded, or kInitResultFailedMissingDependency on Android if Google Play services is not available on the current device.
Returns
An instance ofFunctions corresponding to the givenApp.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-01-23 UTC.