Assets/Watson/Scripts/Services/RetrieveAndRank/RetrieveAndRank.cs
/// <summary>
/// Retrieves the configuration for a cluster by its name.
/// </summary>
/// <param name="callback"></param>
/// <param name="clusterID">Cluster ID for the configuration.</param>
/// <param name="configName">The name of the configuration to retrieve.</param>
/// <param name="customData"></param>
/// <returns></returns>
Retrieves the configuration for a cluster by its name.
Retrieves the configuration for a cluster by its name .
public bool GetClusterConfig(OnGetClusterConfig callback, string clusterID, string configName, string customData = default(string))
        {
            if (callback == null)
                throw new ArgumentNullException("callback");
            if (string.IsNullOrEmpty(clusterID))
                throw new ArgumentNullException("A clusterID is required for GetClusterConfig!");
            if (string.IsNullOrEmpty(configName))
                throw new ArgumentNullException("A configName is required for GetClusterConfig!");
            GetClusterConfigRequest req = new GetClusterConfigRequest();
            req.Data = customData;
            req.Callback = callback;
            req.ClusterID = clusterID;
            req.ConfigName = configName;
            req.OnResponse = GetClusterConfigResponse;
            req.Timeout = REQUEST_TIMEOUT;
            RESTConnector connector = RESTConnector.GetConnector(SERVICE_ID, string.Format(SERVICE_CLUSTER_CONFIG, clusterID, configName));
            if (connector == null)
                return false;
            return connector.Send(req);
        }
public bool GetClusterConfig ( OnGetClusterConfig callback , string clusterID , string configName , string customData = default ( string ) ) { if ( callback == null ) throw new ArgumentNullException ( " " ) ; if ( string . IsNullOrEmpty ( clusterID ) ) throw new ArgumentNullException ( " " ) ; if ( string . IsNullOrEmpty ( configName ) ) throw new ArgumentNullException ( " " ) ; GetClusterConfigRequest req = new GetClusterConfigRequest ( ) ; req . Data = customData ; req . Callback = callback ; req . ClusterID = clusterID ; req . ConfigName = configName ; req . OnResponse = GetClusterConfigResponse ; req . Timeout = REQUEST_TIMEOUT ; RESTConnector connector = RESTConnector . GetConnector ( SERVICE_ID , string . Format ( SERVICE_CLUSTER_CONFIG , clusterID , configName ) ) ; if ( connector == null ) return false ; return connector . Send ( req ) ; }
Retrieves the configuration for a cluster by its name.
Retrieves the configuration for a cluster by its name .
None
callback
OnGetClusterConfig
None
clusterID
string
Cluster ID for the configuration.
Cluster ID for the configuration .
configName
string
The name of the configuration to retrieve.
The name of the configuration to retrieve .
customData
string
None