using System; namespace JustTrack { #if !UNITY_WEBGL /// /// Interface for Remote Config functionalities. /// public interface IRemoteConfig { /// /// Fetches remote config values from the server if the minimum fetch interval has elapsed. /// /// Callback invoked on success. /// Callback invoked on failure. void Fetch(Action pOnSuccess, Action pOnFailure); /// /// Activates experiment assignments by confirming enrollment with the server. /// /// Array of experiment ids to activate. /// Callback invoked on success. /// Callback invoked on failure. void Activate(string[] experiments, Action pOnSuccess, Action pOnFailure); /// /// A convenience method that fetches and then activates all pending experiments in one call. /// /// Callback invoked on success. /// Callback invoked on failure. void FetchAndActivate(Action pOnSuccess, Action pOnFailure); /// /// Sets the Remote Config settings. /// /// The settings to apply. void SetConfig(JusttrackRemoteConfigSettings settings); /// /// Gets all current experiment assignments. /// /// Array of current experiment assignments. public Assignment[] GetAll(); /// /// Gets a boolean value from Remote Config. /// /// The key of the config value. /// Config value as Boolean. If the config value is not a valid Boolean or is not found, null is returned. public bool? GetBoolean(string configKey); /// /// Gets a double value from Remote Config. /// /// The key of the config value. /// Config value as Double. If the config value is not a valid Double or is not found, null is returned. public double? GetDouble(string configKey); /// /// Gets an integer value from Remote Config. /// /// The key of the config value. /// Config value as Integer. If the config value is not a valid Integer or is not found, null is returned. public int? GetInt(string configKey); /// /// Gets a long value from Remote Config. /// /// The key of the config value. /// Config value as Long. If the config value is not a valid Long or is not found, null is returned. public long? GetLong(string configKey); /// /// Gets a string value from Remote Config. /// /// The key of the config value. /// Config value as String. If the config value is not a valid String or is not found, null is returned. public string? GetString(string configKey); } #endif }