// 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"); }
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; }
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; }
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); }
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); }
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); }
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); }