firebase::functions::Functions

#include <functions.h>

Entry point for the Firebase C++ SDK for Cloud Functions.

Summary

To use the SDK, call firebase::functions::Functions::GetInstance() to obtain an instance of Functions, then use GetHttpsCallable() 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 Cloud Functions emulator to use.
app()
Get the firebase::App that this Functions was created with.

Public static functions

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

Public functions

GetHttpsCallable

HttpsCallableReference GetHttpsCallable(
  const char *name
) const 

Get a FunctionsReference for the specified path.

GetHttpsCallableFromURL

HttpsCallableReference GetHttpsCallableFromURL(
  const char *url
) const 

Get a FunctionsReference for the specified URL.

UseFunctionsEmulator

void UseFunctionsEmulator(
  const char *origin
)

Sets an origin for a Cloud Functions emulator to use.

app

::firebase::App * app()

Get the firebase::App that this Functions was created with.

Details
Returns
The firebase::App this Functions was created with.

~Functions

 ~Functions()

Destructor.

You may delete an instance of Functions when you are finished using it, to shut down the Functions library.

Public static functions

GetInstance

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

Get an instance of Functions corresponding to the given App.

Cloud Functions uses firebase::App to communicate with Firebase Authentication to authenticate users to the server backend.

Details
Parameters
app
An instance of firebase::App. Cloud Functions 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 of Functions corresponding to the given App.

GetInstance

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

Get an instance of Functions corresponding to the given App.

Cloud Functions uses firebase::App to communicate with Firebase Authentication to authenticate users to the server backend.

Details
Parameters
app
An instance of firebase::App. Cloud Functions 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 of Functions corresponding to the given App.