Assets/Watson/Scripts/Services/VisualRecognition/VisualRecognition.cs
/// <summary>
/// Gets a list of all classifiers.
/// </summary>
/// <returns><c>true</c>, if classifiers was gotten, <c>false</c> otherwise.</returns>
/// <param name="callback">Callback.</param>
/// <param name="customData">CustomData.</param>
Gets a list of all classifiers.
Gets a list of all classifiers .
public bool GetClassifiers(OnGetClassifiers callback, string customData = default(string))
        {
            if(callback == null)
                throw new ArgumentNullException("callback");
            if(string.IsNullOrEmpty(mp_ApiKey))
                mp_ApiKey = Config.Instance.GetAPIKey(SERVICE_ID);
            if(string.IsNullOrEmpty(mp_ApiKey))
                throw new WatsonException("No API Key was found!");
            RESTConnector connector = RESTConnector.GetConnector(SERVICE_ID, SERVICE_CLASSIFIERS);
            if(connector == null)
                return false;
            GetClassifiersReq req = new GetClassifiersReq();
            req.Callback = callback;
            req.Data = customData;
            req.Parameters["api_key"] = mp_ApiKey;
            req.Parameters["version"] = VisualRecognitionVersion.Version;
            req.Timeout = 20.0f * 60.0f;
            req.OnResponse = OnGetClassifiersResp;
            return connector.Send(req);
        }
public bool GetClassifiers ( OnGetClassifiers callback , string customData = default ( string ) ) { if ( callback == null ) throw new ArgumentNullException ( " " ) ; if ( string . IsNullOrEmpty ( mp_ApiKey ) ) mp_ApiKey = Config . Instance . GetAPIKey ( SERVICE_ID ) ; if ( string . IsNullOrEmpty ( mp_ApiKey ) ) throw new WatsonException ( " " ) ; RESTConnector connector = RESTConnector . GetConnector ( SERVICE_ID , SERVICE_CLASSIFIERS ) ; if ( connector == null ) return false ; GetClassifiersReq req = new GetClassifiersReq ( ) ; req . Callback = callback ; req . Data = customData ; req . Parameters [ " " ] = mp_ApiKey ; req . Parameters [ " " ] = VisualRecognitionVersion . Version ; req . Timeout = 20.0f * 60.0f ; req . OnResponse = OnGetClassifiersResp ; return connector . Send ( req ) ; }
Gets a list of all classifiers.
Gets a list of all classifiers .
None
callback
OnGetClassifiers
None
customData
string
None