Example #1
0
    /// <summary>
    /// Validates AppId and AppToken
    /// </summary>
    static void ValidateApp()
    {
        if (!ConfigurationManager.periodicSendFlag && !ConfigurationManager.pauseSendFlag)
        {
            warnings = "Please select when to send data";
            return;
        }
        EditorUtility.DisplayProgressBar("Validating App Id and Token", "", 0.10f);
        HttpRequestHandler.SucessCallback success = validateAppSuccess;
        HttpRequestHandler.ErrorCallback  error   = validateAppError;
        string url = VadRConfig.getAppUrl + "?id=" + appId + "&token=" + appToken;

        string[] args = { };
        HttpRequestHandler.GetRequestMainThread(url, 10000, success, error, args);
    }
Example #2
0
 private void updateUploadStatus()
 {
     if (this.model != null)
     {
         string request = "{\"modelId\": \"" + this.model.modelId + "\",";
         request += "\"sceneId\": \"" + this.model.sceneId + "\",";
         request += "\"token\": \"" + this.token + "\",";
         request += "\"files\": [";
         for (int i = 0; i < this.model.files.Count; i++)
         {
             request += "\"" + this.model.files[i].id + "\",";
         }
         if (request[request.Length - 1] == ',')
         {
             request = request.Substring(0, request.Length - 1);
         }
         request += "]}";
         HttpRequestHandler.SucessCallback success = this.updateStatusSuccess;
         HttpRequestHandler.ErrorCallback  error   = this.updateStatusError;
         HttpRequestHandler.PostRequest(VadRConfig.UPDATE_FILE_STATUS_URL, request, 10000, success, error, new string[0]);
     }
 }
Example #3
0
 private void regiterFiles(string request)
 {
     HttpRequestHandler.SucessCallback success = this.registerFileSuccess;
     HttpRequestHandler.ErrorCallback  error   = this.registerFileError;
     HttpRequestHandler.PostRequest(VadRConfig.REGISTER_FILE_URL, request, 10000, success, error, new string[0]);
 }