firebase

Version: stable

FUNCTION
firebase.remoteconfig.initialize()
firebase.remoteconfig.set_callback()
firebase.remoteconfig.fetch()
firebase.remoteconfig.activate()
firebase.remoteconfig.fetch_and_activate()
firebase.remoteconfig.get_boolean()
firebase.remoteconfig.get_data()
firebase.remoteconfig.get_number()
firebase.remoteconfig.get_string()
firebase.remoteconfig.get_keys()
firebase.remoteconfig.set_defaults()
firebase.remoteconfig.set_minimum_fetch_interval()
firebase.remoteconfig.set_timeout()
CONSTANT
MSG_INITIALIZED
MSG_ERROR
MSG_DEFAULTS_SET
MSG_FETCHED
MSG_ACTIVATED
MSG_SETTINGS_UPDATED

Functions

firebase.remoteconfig.initialize()

firebase.remoteconfig.initialize()

Initialise Firebase Remote Config. Generates MSG_INITIALIZED or MSG_ERROR

PARAMETERS

None


firebase.remoteconfig.set_callback()

firebase.remoteconfig.set_callback(callback)

Sets a callback function for receiving events from the SDK. Call `firebase.set_callback(nil)` to remove callback

PARAMETERS

callback function Callback function that is executed on any event in the SDK.
self object The calling script instance
message_id number One of message types: `firebase.remoteconfig.MSG_INITIALIZED` `firebase.remoteconfig.MSG_INSTALLATION_AUTH_TOKEN` `firebase.remoteconfig.MSG_INSTALLATION_ID` `firebase.remoteconfig.MSG_DEFAULTS_SET` `firebase.remoteconfig.MSG_FETCHED` `firebase.remoteconfig.MSG_ACTIVATED` `firebase.remoteconfig.MSG_SETTINGS_UPDATED` `firebase.remoteconfig.MSG_ERROR`
message table A table holding the data

firebase.remoteconfig.fetch()

firebase.remoteconfig.fetch()

Fetches config data from the server. Generates MSG_FETCHED or MSG_ERROR

PARAMETERS

None


firebase.remoteconfig.activate()

firebase.remoteconfig.activate()

Asynchronously activates the most recently fetched configs, so that the fetched key value pairs take effect. Generates MSG_ACTIVATED or MSG_ERROR

PARAMETERS

None


firebase.remoteconfig.fetch_and_activate()

firebase.remoteconfig.fetch_and_activate()

Asynchronously fetches and then activates the fetched configs. Generates MSG_FETCHED and MSG_ACTIVATED or MSG_ERROR

PARAMETERS

None


firebase.remoteconfig.get_boolean()

firebase.remoteconfig.get_boolean(key)

Returns the value associated with a key, converted to a bool.

PARAMETERS

key string Key of the value to be retrieved

firebase.remoteconfig.get_data()

firebase.remoteconfig.get_data(key)

Returns the value associated with a key, as a vector of raw byte-data.

PARAMETERS

key string Key of the value to be retrieved

firebase.remoteconfig.get_number()

firebase.remoteconfig.get_number(key)

Returns the value associated with a key, converted to a double.

PARAMETERS

key string Key of the value to be retrieved

firebase.remoteconfig.get_string()

firebase.remoteconfig.get_string(key)

Returns the value associated with a key, converted to a string.

PARAMETERS

key string Key of the value to be retrieved

firebase.remoteconfig.get_keys()

firebase.remoteconfig.get_keys()

Gets the set of all keys.

PARAMETERS

None


firebase.remoteconfig.set_defaults()

firebase.remoteconfig.set_defaults(defaults)

Sets the default values.

PARAMETERS

defaults table Key-value pairs representing the default values. Generates MSG_DEFAULTS_SET or MSG_ERROR

firebase.remoteconfig.set_minimum_fetch_interval()

firebase.remoteconfig.set_minimum_fetch_interval(minimum_fetch_interval)

Sets the minimum fetch interval.

PARAMETERS

minimum_fetch_interval int The minimum interval in milliseconds between successive fetch calls. Generates MSG_SETTINGS_UPDATED or MSG_ERROR

firebase.remoteconfig.set_timeout()

firebase.remoteconfig.set_timeout(minimum_fetch_interval)

Sets the timeout that specifies how long the client should wait for a connection to the Firebase Remote Config servers

PARAMETERS

minimum_fetch_interval int The timeout interval in milliseconds. Generates MSG_SETTINGS_UPDATED or MSG_ERROR

Constants

MSG_INITIALIZED

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


MSG_ERROR

Event generated when an error occurred.


MSG_DEFAULTS_SET

Event generated when the default values have been set


MSG_FETCHED

Event generated when the remote config has been fetched


MSG_ACTIVATED

Event generated when the remote config has been activated


MSG_SETTINGS_UPDATED

Event generated when remote config settings have been updated