remoteconfig

Version: stable

FUNCTION
remoteconfig.init()
remoteconfig.fetch()
remoteconfig.activate()
remoteconfig.fetch_and_activate()
remoteconfig.get_boolean()
remoteconfig.get_data()
remoteconfig.get_number()
remoteconfig.get_string()
remoteconfig.set_defaults()
CONSTANT
remoteconfig.CONFIG_INITIALIZED
remoteconfig.CONFIG_ERROR
remoteconfig.CONFIG_DEFAULTS_SET
remoteconfig.CONFIG_FETCHED
remoteconfig.CONFIG_ACTIVATED

Functions

remoteconfig.init()

remoteconfig.init(callback)

Initialise Firebase Remote Config. Generates CONFIG_INITIALIZE or CONFIG_ERROR

PARAMETERS

callback Function to call when a remote config event has happened

remoteconfig.fetch()

remoteconfig.fetch()

Fetches config data from the server. (Official docs https://firebase.google.com/docs/reference/cpp/class/firebase/remote-config/remote-config#fetch). Generates CONFIG_FETCHED or CONFIG_ERROR

PARAMETERS


remoteconfig.activate()

remoteconfig.activate()

Asynchronously activates the most recently fetched configs, so that the fetched key value pairs take effect. (Official docs https://firebase.google.com/docs/reference/cpp/class/firebase/remote-config/remote-config#activate). Generates CONFIG_ACTIVATED or CONFIG_ERROR

PARAMETERS


remoteconfig.fetch_and_activate()

remoteconfig.fetch_and_activate()

Asynchronously fetches and then activates the fetched configs. (Official docs https://firebase.google.com/docs/reference/cpp/class/firebase/remote-config/remote-config#fetchandactivate). Generates CONFIG_FETCHED and CONFIG_ACTIVATED or CONFIG_ERROR

PARAMETERS


remoteconfig.get_boolean()

remoteconfig.get_boolean(key)

Returns the value associated with a key, converted to a bool. (Official docs https://firebase.google.com/docs/reference/cpp/class/firebase/remote-config/remote-config#getboolean)

PARAMETERS

key Key of the value to be retrieved

remoteconfig.get_data()

remoteconfig.get_data(key)

Returns the value associated with a key, as a vector of raw byte-data. (Official docs https://firebase.google.com/docs/reference/cpp/class/firebase/remote-config/remote-config#getdata)

PARAMETERS

key Key of the value to be retrieved

remoteconfig.get_number()

remoteconfig.get_number(key)

Returns the value associated with a key, converted to a double. (Official docs https://firebase.google.com/docs/reference/cpp/class/firebase/remote-config/remote-config#getdouble)

PARAMETERS

key Key of the value to be retrieved

remoteconfig.get_string()

remoteconfig.get_string(key)

Returns the value associated with a key, converted to a string. (Official docs https://firebase.google.com/docs/reference/cpp/class/firebase/remote-config/remote-config#getstring)

PARAMETERS

key Key of the value to be retrieved

remoteconfig.set_defaults()

remoteconfig.set_defaults(defaults)

Sets the default values. (Official docs https://firebase.google.com/docs/reference/cpp/class/firebase/remote-config/remote-config#setdefaults)

PARAMETERS

defaults Key-value pairs representing the default values. Generates CONFIG_DEFAULTS_SET or CONFIG_ERROR

Constants

remoteconfig.CONFIG_INITIALIZED

Event generated when remote config has been initialized and is ready for use


remoteconfig.CONFIG_ERROR

Event generated when an error occurred.


remoteconfig.CONFIG_DEFAULTS_SET

Event generated when the default values have been set


remoteconfig.CONFIG_FETCHED

Event generated when the remote config has been fetched


remoteconfig.CONFIG_ACTIVATED

Event generated when the remote config has been activated