예제 #1
0
        // train:モデル作成、 predict:モデル適用
        public Upload(InputFormData <UploadRequestParam> paras)
        {
            SettingData setting = SettingDataCommand.LoadFile(paras.SettingFile);

            ApiKey    = setting.ApiKey;
            ApiSecret = setting.ApiSecret;

            formData.Add(new StringContent(ApiKey), "key");
            formData.Add(new StringContent(ApiSecret), "secret");
            formData.Add(new StringContent(paras.RequestParam.Method), "method");
        }
예제 #2
0
        public ModeleCreate(InputFormData <ModelCreateRequestRaram> iData)
        {
            SettingData setting = SettingDataCommand.LoadFile(iData.SettingFile);

            ApiKey    = setting.ApiKey;
            ApiSecret = setting.ApiSecret;

            modelCreateReqData.Key      = ApiKey;
            modelCreateReqData.Secret   = ApiSecret;
            modelCreateReqData.WaitTime = (int)TimeOut;
        }
예제 #3
0
        public Summary(InputFormData <SummaryRequestParam> paras)
        {
            SettingData setting = SettingDataCommand.LoadFile(paras.SettingFile);

            ApiKey    = setting.ApiKey;
            ApiSecret = setting.ApiSecret;

            summaryReqData.Key      = ApiKey;
            summaryReqData.Secret   = ApiSecret;
            summaryReqData.WaitTime = (int)TimeOut;
        }
예제 #4
0
        public static ModelApplyResultData ModelApplied(InputFormData <ModelApplyRequestRaram> reqRaram)
        {
            ModeleApply create = new ModeleApply(reqRaram);
            var         task   = "OK";

            if (task == "NG")
            {
                string msg = "HTTP Response Status Code:500\r\nHTTP Response Status Reason:NG";
                throw new Exception(msg);
            }

            int mType    = MsgBox.ResponseMsgBoxShow("1", "OK", null);
            var rsltData = new ModelApplyResultData
            {
                MsgType = mType
            };

            return(rsltData);
        }
예제 #5
0
        public static ModelCreateResultData ModelCreate(InputFormData <ModelCreateRequestRaram> paras)
        {
            ModeleCreate create = new ModeleCreate(paras);
            string       json   = JsonUtility.Serialize(create.modelCreateReqData, true);
            var          task   = create.Request(json);

            if (task == "NG")
            {
                string msg = "HTTP Response Status Code:500\r\nHTTP Response Status Reason:NG";
                throw new Exception(msg);
            }

            int mType = MsgBox.ResponseMsgBoxShow("1", "OK", null);

            var rsltData = new ModelCreateResultData()
            {
                MsgType = mType,
            };

            return(rsltData);
        }
예제 #6
0
        public static SummaryResultData Collection(InputFormData <SummaryRequestParam> paras)
        {
            Summary summary = new Summary(paras);
            string  json    = "json";
            var     task    = summary.Request(json);

            if (task == "NG")
            {
                string msg = "HTTP Response Status Code:500\r\nHTTP Response Status Reason:NG";
                throw new Exception(msg);
            }

            int mType = MsgBox.ResponseMsgBoxShow("1", "OK", null);

            SummaryResultData rsltData = new SummaryResultData
            {
                MsgType = mType,
                Purpose = paras.RequestParam.Purpose
            };

            return(rsltData);
        }
예제 #7
0
        public static UploadResultData UploadCSV(InputFormData <UploadRequestParam> iData)
        {
            Upload upload = new Upload(iData);
            var    task   = "OK";

            if (task == "NG")
            {
                string msg = "HTTP Response Status Code:500\r\nHTTP Response Status Reason:NG";
                throw new Exception(msg);
            }

            FileInfo file = new FileInfo(iData.RequestParam.FileFullName);

            int mType = MsgBox.ResponseMsgBoxShow("1", "a", null);

            var rsltData = new UploadResultData
            {
                MsgType = mType,
                DsName  = "a"
            };

            return(rsltData);
        }