Class RemoteConfigWebApiClient | Remote Config | 1.3.2-preview.10
docs.unity3d.com
    Show / Hide Table of Contents

    Class RemoteConfigWebApiClient

    This is a utility class for Remote Config to handle all Remote Config CRUD operations.

    Inheritance
    Object
    RemoteConfigWebApiClient
    Namespace: Unity.RemoteConfig.Editor
    Syntax
    public static class RemoteConfigWebApiClient

    Properties

    webRequestsAreDone

    Checks if there are any unfinished web requests. Returns true if all web requests are done.

    Declaration
    public static bool webRequestsAreDone { get; }
    Property Value
    Type Description
    Boolean

    Methods

    CreateEnvironment(String, String, Action<Exception>)

    Creates new environment.

    Declaration
    public static void CreateEnvironment(string cloudProjectId, string environmentName, Action<Exception> responseParseErrorCallback = null)
    Parameters
    Type Name Description
    String cloudProjectId

    Cloud Project ID for this Unity application.

    String environmentName

    Name of the environment to be created.

    Action<Exception> responseParseErrorCallback

    Optional callback for parsing errors.

    DeleteConfig(String, String)

    Sends a DELETE request to delete aconfig.

    Declaration
    public static void DeleteConfig(string cloudProjectId, string configId)
    Parameters
    Type Name Description
    String cloudProjectId
    String configId

    ID of the config to be deleted

    DeleteEnvironment(String, String)

    Sends a DELETE request to delete an environment.

    Declaration
    public static void DeleteEnvironment(string cloudProjectId, string environmentId)
    Parameters
    Type Name Description
    String cloudProjectId
    String environmentId

    ID of the environment to be deleted

    DeleteRule(String, String, String)

    Delete a rule from the given environment.

    Declaration
    public static void DeleteRule(string cloudProjectId, string environmentId, string ruleId)
    Parameters
    Type Name Description
    String cloudProjectId

    Cloud Project ID for this Unity application.

    String environmentId

    ID of the environment where the rule was deleted from

    String ruleId

    ID of the deleted rule

    FetchConfigs(String, String, Action<Exception>)

    Fetches all configs for the given environment ID.

    Declaration
    public static void FetchConfigs(string cloudProjectId, string environmentId, Action<Exception> responseParseErrorCallback = null)
    Parameters
    Type Name Description
    String cloudProjectId

    Cloud Project ID for this Unity application.

    String environmentId

    ID of the environment that we want to fetch configs for

    Action<Exception> responseParseErrorCallback

    Optional callback for parsing errors.

    FetchDefaultEnvironment(String, Action<Exception>)

    Fetches default environment for the current project.

    Declaration
    public static void FetchDefaultEnvironment(string cloudProjectId, Action<Exception> responseParseErrorCallback = null)
    Parameters
    Type Name Description
    String cloudProjectId

    Cloud Project ID for this Unity application.

    Action<Exception> responseParseErrorCallback

    Optional callback for parsing errors.

    FetchEnvironments(String, Action<Exception>)

    Fetches all environments for the current project.

    Declaration
    public static void FetchEnvironments(string cloudProjectId, Action<Exception> responseParseErrorCallback = null)
    Parameters
    Type Name Description
    String cloudProjectId

    Cloud Project ID for this Unity application.

    Action<Exception> responseParseErrorCallback

    Optional callback for parsing errors.

    FetchRules(String, String, Action<Exception>)

    Fetches all rules for the given config ID.

    Declaration
    public static void FetchRules(string cloudProjectId, string configId, Action<Exception> responseParseErrorCallback = null)
    Parameters
    Type Name Description
    String cloudProjectId

    Cloud Project ID for this Unity application.

    String configId

    ID of the config that we want to fetch rules for

    Action<Exception> responseParseErrorCallback

    Optional callback for parsing errors.

    PostAddRule(String, String, String, JObject, Action<Exception>)

    Sends a POST request to add a new rule to the given config in the given environment.

    Declaration
    public static void PostAddRule(string cloudProjectId, string environmentId, string configId, JObject rule, Action<Exception> responseParseErrorCallback = null)
    Parameters
    Type Name Description
    String cloudProjectId

    Cloud Project ID for this Unity application.

    String environmentId

    ID of the environment where the new rule was added

    String configId

    ID of the config containing this rule

    JObject rule

    The rule that was added

    Action<Exception> responseParseErrorCallback

    Optional callback for parsing errors.

    PostConfig(String, String, JArray, Action<Exception>)

    Pushes a new config to the server in the given environment.

    Declaration
    public static void PostConfig(string cloudProjectId, string environmentId, JArray configValue, Action<Exception> responseParseErrorCallback = null)
    Parameters
    Type Name Description
    String cloudProjectId

    Cloud Project ID for this Unity application.

    String environmentId

    ID of the environment containing the config to be pushed.

    JArray configValue

    List of settings to be pushed.

    Action<Exception> responseParseErrorCallback

    Optional callback for parsing errors.

    PutConfig(String, String, String, JArray)

    Pushes updates to the given existing config to the server for the given environment.

    Declaration
    public static void PutConfig(string cloudProjectId, string environmentId, string configId, JArray configValue)
    Parameters
    Type Name Description
    String cloudProjectId

    Cloud Project ID for this Unity application.

    String environmentId

    ID of the environment containing the config to be pushed.

    String configId

    ID of the config to be pushed.

    JArray configValue

    List of settings to be pushed.

    PutEditRule(String, String, String, JObject)

    Sends a PUT request to update a rule in the given environment and config.

    Declaration
    public static void PutEditRule(string cloudProjectId, string environmentId, string configId, JObject rule)
    Parameters
    Type Name Description
    String cloudProjectId

    Cloud Project ID for this Unity application.

    String environmentId

    ID of the environment where the updated rule exists

    String configId

    ID of the config where the updated rule exists

    JObject rule

    The updated rule with the new attributes

    SetDefaultEnvironment(String, String)

    Sets default environment.

    Declaration
    public static void SetDefaultEnvironment(string cloudProjectId, string environmentId)
    Parameters
    Type Name Description
    String cloudProjectId

    Cloud Project ID for this Unity application.

    String environmentId

    ID of the environment to be updated

    UpdateEnvironment(String, String, String)

    Sends a PUT request to update an environment.

    Declaration
    public static void UpdateEnvironment(string cloudProjectId, string environmentId, string envName)
    Parameters
    Type Name Description
    String cloudProjectId

    Cloud Project ID for this Unity application.

    String environmentId

    ID of the environment to be updated

    String envName

    Name of the environment to be updated

    Events

    environmentCreated

    Declaration
    public static event Action<string> environmentCreated
    Event Type
    Type Description
    Action<String>

    environmentCRUDError

    Declaration
    public static event Action<JObject> environmentCRUDError
    Event Type
    Type Description
    Action<JObject>

    environmentDeleted

    Declaration
    public static event Action environmentDeleted
    Event Type
    Type Description
    Action

    environmentUpdated

    Declaration
    public static event Action environmentUpdated
    Event Type
    Type Description
    Action

    fetchConfigsFinished

    Declaration
    public static event Action<JObject> fetchConfigsFinished
    Event Type
    Type Description
    Action<JObject>

    fetchDefaultEnvironmentFinished

    Declaration
    public static event Action<string> fetchDefaultEnvironmentFinished
    Event Type
    Type Description
    Action<String>

    fetchEnvironmentsFinished

    Declaration
    public static event Action<JArray> fetchEnvironmentsFinished
    Event Type
    Type Description
    Action<JArray>

    fetchRulesFinished

    Declaration
    public static event Action<JArray> fetchRulesFinished
    Event Type
    Type Description
    Action<JArray>

    postAddRuleFinished

    Declaration
    public static event Action<JObject, string> postAddRuleFinished
    Event Type
    Type Description
    Action<JObject, String>

    postConfigRequestFinished

    Declaration
    public static event Action<string> postConfigRequestFinished
    Event Type
    Type Description
    Action<String>

    rcRequestFailed

    Declaration
    public static event Action<long, string> rcRequestFailed
    Event Type
    Type Description
    Action<Int64, String>

    ruleRequestSuccess

    Declaration
    public static event Action<string, string> ruleRequestSuccess
    Event Type
    Type Description
    Action<String, String>

    settingsRequestFinished

    Declaration
    public static event Action settingsRequestFinished
    Event Type
    Type Description
    Action
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023