예제 #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 SettingData LoadFile(FileInfo file)
        {
            SettingData setting = new SettingData();

            if (file.Exists)
            {
                string data = TextUtility.ReadTXT(file.FullName, Encoding.GetEncoding("utf-8"));
                setting = JsonUtility.Deserialize <SettingData>(data);
            }

            return(setting);
        }
예제 #5
0
        public static void UpdateFile(FileInfo file, SettingData data)
        {
            string json = JsonUtility.Serialize(data);

            TextUtility.WriteTXT(file.FullName, json, Encoding.GetEncoding("utf-8"));
        }